Fix react-query workaround to use refetchOnMount: always'

This commit is contained in:
James Grugett 2022-08-28 16:30:42 -05:00
parent dd6a8a3f16
commit 8b1874e7bb

View File

@ -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[]