Hook for managing alert toast notifications
Tracks new alerts and provides a queue of toasts to display. Automatically removes acknowledged alerts from the queue.
function MeetingRoom() { const { alerts } = useAlerts(roomId); const { toastAlerts, dismissToast } = useAlertToasts({ roomId, enabled: true, maxVisible: 3, }); return ( <> <AlertsPanel roomId={roomId} /> <AlertStack alerts={toastAlerts} onDismiss={(id) => dismissToast(id)} /> </> );} Copy
function MeetingRoom() { const { alerts } = useAlerts(roomId); const { toastAlerts, dismissToast } = useAlertToasts({ roomId, enabled: true, maxVisible: 3, }); return ( <> <AlertsPanel roomId={roomId} /> <AlertStack alerts={toastAlerts} onDismiss={(id) => dismissToast(id)} /> </> );}
Hook for managing alert toast notifications
Tracks new alerts and provides a queue of toasts to display. Automatically removes acknowledged alerts from the queue.