From 07d75bd7cbf8d50c2abb708acb304775e3dba9c7 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 14 Oct 2025 06:53:12 +0000 Subject: [PATCH] Guard realtime updates on unmount cgen-2edf604a070a4f9fa89e5cb0531d8646 --- client/components/notifications/NotificationBell.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/components/notifications/NotificationBell.tsx b/client/components/notifications/NotificationBell.tsx index 40f9015f..1578b1ed 100644 --- a/client/components/notifications/NotificationBell.tsx +++ b/client/components/notifications/NotificationBell.tsx @@ -87,6 +87,7 @@ export default function NotificationBell({ className }: { className?: string }) const subscription = aethexRealtimeService.subscribeToUserNotifications( user.id, (payload: any) => { + if (!isActive) return; const next = (payload?.new ?? payload) as AethexNotification | undefined; if (!next?.id) return;