Fix react-query workaround to use refetchOnMount: always'
This commit is contained in:
parent
dd6a8a3f16
commit
8b1874e7bb
|
@ -20,8 +20,9 @@ function useNotifications(privateUser: PrivateUser) {
|
||||||
{ subscribe: true, includeMetadataChanges: true },
|
{ subscribe: true, includeMetadataChanges: true },
|
||||||
// Temporary workaround for react-query bug:
|
// Temporary workaround for react-query bug:
|
||||||
// https://github.com/invertase/react-query-firebase/issues/25
|
// https://github.com/invertase/react-query-firebase/issues/25
|
||||||
{ cacheTime: 0 }
|
{ refetchOnMount: 'always' }
|
||||||
)
|
)
|
||||||
|
|
||||||
const notifications = useMemo(() => {
|
const notifications = useMemo(() => {
|
||||||
if (!result.data) return undefined
|
if (!result.data) return undefined
|
||||||
const notifications = result.data as Notification[]
|
const notifications = result.data as Notification[]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user