import { useToastStore } from '../stores/toast' import type { ToastType } from '../stores/toast' import styles from './Toast.module.css' const TYPE_CLASS: Record = { success: styles.toastSuccess, error: styles.toastError, info: styles.toastInfo, } export default function ToastContainer() { const { toasts, removeToast } = useToastStore() if (toasts.length === 0) return null return (
{toasts.map((t) => (
{t.message}
))}
) }