"use client" import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from "./toast" import { useToast } from "./use-toast" export interface ToastProps { id: string title?: string description?: string action?: React.ReactNode variant?: "default" | "destructive" } export function Toaster() { const { toasts } = useToast() return ( {toasts.map(function ({ id, title, description, action, ...props }: { id: string; title?: React.ReactNode; description?: React.ReactNode; action?: React.ReactNode; [key: string]: any; }) { return (
{title && {title}} {description && ( {description} )}
{action}
) })}
) }