From 12b68031e1fda3533cf742e984c4faaba0063f4a Mon Sep 17 00:00:00 2001 From: notshop Date: Sun, 26 Apr 2026 16:35:01 +0000 Subject: [PATCH] chore: add client/src/components/ui/toaster.tsx --- client/src/components/ui/toaster.tsx | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 client/src/components/ui/toaster.tsx diff --git a/client/src/components/ui/toaster.tsx b/client/src/components/ui/toaster.tsx new file mode 100644 index 0000000..7f0c5eb --- /dev/null +++ b/client/src/components/ui/toaster.tsx @@ -0,0 +1,29 @@ +import { useEffect, useState } from "react"; +import { useToast } from "../../hooks/use-toast"; +import { X } from "lucide-react"; + +export function Toaster() { + const { toasts, subscribe } = useToast(); + + useEffect(() => { + const unsub = subscribe(); + return unsub; + }, [subscribe]); + + return ( +
+ {toasts.map((t) => ( +
+
+ {t.title &&

{t.title}

} + {t.description &&

{t.description}

} +
+
+ ))} +
+ ); +}