feat(calendar): add event notifications with alert evaluation
Add client-side calendar event notification system that evaluates JMAP CalendarEventAlert triggers and displays toast notifications when alert times are reached. Includes configurable notification sound, acknowledged alert persistence, and proactive event fetching for background alerts. Also mounts ToastContainer globally to fix silent toast failures.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"use client";
|
||||
|
||||
import { useCalendarAlerts } from '@/hooks/use-calendar-alerts';
|
||||
import { ToastContainer } from '@/components/ui/toast';
|
||||
import { useToastStore } from '@/stores/toast-store';
|
||||
|
||||
export function CalendarAlertProvider({ children }: { children: React.ReactNode }) {
|
||||
useCalendarAlerts();
|
||||
|
||||
const toasts = useToastStore((s) => s.toasts);
|
||||
const removeToast = useToastStore((s) => s.removeToast);
|
||||
|
||||
return (
|
||||
<>
|
||||
{children}
|
||||
<ToastContainer toasts={toasts} onClose={removeToast} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user