diff --git a/src/components/providers/notification-provider.tsx b/src/components/providers/notification-provider.tsx index 1352bd1..e194d60 100644 --- a/src/components/providers/notification-provider.tsx +++ b/src/components/providers/notification-provider.tsx @@ -43,9 +43,15 @@ export function NotificationProvider() { let unsubscribe: (() => void) | null = null; const init = async () => { + console.log('[NotificationProvider] Initializing push notifications...'); const registered = await notificationService.requestPermissionAndRegister(); + console.log('[NotificationProvider] Registration result:', registered); if (registered) { - unsubscribe = notificationService.setupForegroundHandler(addToast); + unsubscribe = notificationService.setupForegroundHandler((payload) => { + console.log('[NotificationProvider] Foreground message received:', payload); + addToast(payload); + }); + console.log('[NotificationProvider] Foreground handler set up'); } };