From 8b1874e7bbc870e7e25de2f533ec3ed062897796 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 28 Aug 2022 16:30:42 -0500 Subject: [PATCH] Fix react-query workaround to use refetchOnMount: always' --- web/hooks/use-notifications.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/hooks/use-notifications.ts b/web/hooks/use-notifications.ts index d02d3d30..b2f1701f 100644 --- a/web/hooks/use-notifications.ts +++ b/web/hooks/use-notifications.ts @@ -20,8 +20,9 @@ function useNotifications(privateUser: PrivateUser) { { subscribe: true, includeMetadataChanges: true }, // Temporary workaround for react-query bug: // https://github.com/invertase/react-query-firebase/issues/25 - { cacheTime: 0 } + { refetchOnMount: 'always' } ) + const notifications = useMemo(() => { if (!result.data) return undefined const notifications = result.data as Notification[]