/* * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL */ import { Toast, ToastClose, ToastDescription, ToastTitle, ToastViewport } from '@/components/ui/toast'; import { useToast } from '@/hooks/use-toast'; export function Toaster() { const { toasts } = useToast(); const visibleToasts = toasts.filter((t) => t.open !== false); return ( {visibleToasts.map(function ({ id, title, description, variant, open, onOpenChange, ...props }) { return (
{title && {title}} {description && {description}}
onOpenChange?.(false)} />
); })}
); }