"use client";
import { useApiStore } from "@/store/uiStore";
export default function AppToasts() {
const { toasts, removeToast } = useApiStore((s) => ({
toasts: s.toasts,
removeToast: s.removeToast
}));
return (
{toasts.map((toast) => (
{toast.message}
))}
);
}
function toastClass(type: "success" | "error" | "info") {
if (type === "success") return "bg-success text-white";
if (type === "error") return "bg-danger text-white";
return "bg-info text-white";
}