Hiyve Components - v1.0.0
    Preparing search index...
    • Hook for managing alert toast notifications

      Tracks new alerts and provides a queue of toasts to display. Automatically removes acknowledged alerts from the queue.

      Parameters

      Returns UseAlertToastsReturn

      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)}
      />
      </>
      );
      }