21 lines
370 B
TypeScript

'use client'
import { useToast } from '@/hooks/useToast'
import ToastBubble from './ToastBubble'
interface ToastProps {
toast: ReturnType<typeof useToast>['toast']
}
export default function Toast({ toast }: ToastProps) {
if (!toast || !toast.show) return null
return (
<ToastBubble
message={toast.message}
variant={toast.variant}
/>
)
}