From cfc6cd540a66e3de04b2176226f0746e358f52b7 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Fri, 3 Apr 2026 08:57:25 +0530 Subject: [PATCH] fix --- src/components/providers/notification-provider.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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'); } };