import { Fragment } from 'react' import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '@/components/ui/toast' import { useToast } from '@/components/ui/use-toast' export const Toaster = () => { const { toasts, dismiss } = useToast() return ( {toasts.map(({ id, title, description, action, ...toast }) => ( !open && dismiss(id)} {...toast}>
{title ? {title} : null} {description ? {description} : null}
{action ? {action} : null}
))}
) }