+
+
+ {value}
+
+
+
+ {sub &&
{sub}
}
+
+ )
+}
diff --git a/app/src/components/ui/Toast.tsx b/app/src/components/ui/Toast.tsx
new file mode 100644
index 0000000..2240277
--- /dev/null
+++ b/app/src/components/ui/Toast.tsx
@@ -0,0 +1,59 @@
+'use client'
+
+import { createContext, useCallback, useContext, useState, type ReactNode } from 'react'
+
+const ToastCtx = createContext<(msg: string) => void>(() => {})
+
+export function useToast() {
+ return useContext(ToastCtx)
+}
+
+export function ToastProvider({ children }: { children: ReactNode }) {
+ const [msg, setMsg] = useState('')
+
+ const show = useCallback((m: string) => {
+ setMsg(m)
+ setTimeout(() => setMsg(''), 2800)
+ }, [])
+
+ return (
+