diff --git a/frontend/src/components/dashboard/AlertBanner.tsx b/frontend/src/components/dashboard/AlertBanner.tsx index bd86cc1..a511259 100644 --- a/frontend/src/components/dashboard/AlertBanner.tsx +++ b/frontend/src/components/dashboard/AlertBanner.tsx @@ -1,5 +1,6 @@ import { Bell, X } from 'lucide-react'; import { getRelativeTime } from '@/lib/date-utils'; +import SnoozeDropdown from '@/components/reminders/SnoozeDropdown'; import type { Reminder } from '@/types'; interface AlertBannerProps { @@ -33,18 +34,7 @@ export default function AlertBanner({ alerts, onDismiss, onSnooze }: AlertBanner {alert.remind_at ? getRelativeTime(alert.remind_at) : ''} -
- {([5, 10, 15] as const).map((m) => ( - - ))} -
+ onSnooze(alert.id, m)} label={alert.title} /> + {open && ( +
+ {OPTIONS.map((opt) => ( + + ))} +
+ )} + + ); +} diff --git a/frontend/src/hooks/useAlerts.tsx b/frontend/src/hooks/useAlerts.tsx index c66d920..5705b0e 100644 --- a/frontend/src/hooks/useAlerts.tsx +++ b/frontend/src/hooks/useAlerts.tsx @@ -5,6 +5,7 @@ import { toast } from 'sonner'; import { Bell } from 'lucide-react'; import api from '@/lib/api'; import { getRelativeTime } from '@/lib/date-utils'; +import SnoozeDropdown from '@/components/reminders/SnoozeDropdown'; import type { Reminder } from '@/types'; const MAX_TOASTS = 3; @@ -102,19 +103,11 @@ export function AlertsProvider({ children }: { children: ReactNode }) {

{reminder.title}

{timeAgo}

-
-
- {[5, 10, 15].map((m) => ( - - ))} -
+
+ snoozeRef.current(reminder.id, m)} + label={reminder.title} + />