import { useAlerts } from '@hiyve/react-intelligence';
import { useAlertToastsWithProvider, AlertStack } from '@hiyve/react-intelligence';
function MeetingRoom() {
const alertsHook = useAlerts(roomId);
const { toastAlerts, dismissToast } = useAlertToastsWithProvider(
alertsHook.alerts,
{ enabled: true, maxVisible: 3 }
);
return (
<AlertStack
alerts={toastAlerts}
onDismiss={(id) => dismissToast(id)}
/>
);
}
Hook that integrates useAlertToasts with cloud-provider's useAlerts
This is a convenience hook that watches for new alerts and automatically shows them as toasts.