/* * Toasts.tsx * Zyquo Cloud Web * * Author: Simon-Pierre Boucher * Mail: contact@spboucher.ai * * Toast stack: graceful human errors, success confirmations, and undo for * soft deletes. */ import { useStore } from '../state/store' import { IconX } from './icons' export default function Toasts() { const toasts = useStore((s) => s.toasts) const dismissToast = useStore((s) => s.dismissToast) if (toasts.length === 0) return null return (
{toasts.map((toast) => (
{toast.text} {toast.undo && ( )}
))}
) }