import { usePlayerStore } from '@/stores/playerStore'; import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, } from './toast'; import { useToast } from './use-toast'; export function Toaster() { const { toasts } = useToast(); const isPlayerOpen = !!usePlayerStore((s) => s.audioUrl); return ( {toasts.map(({ id, title, description, action, ...props }) => (
{title && {title}} {description && {description}}
{action}
))}
); }