Turn off react-query notification subscription because it's buggy

This commit is contained in:
James Grugett 2022-09-02 22:51:33 -05:00
parent 784c081663
commit bfa88c3406

View File

@ -16,11 +16,7 @@ export type NotificationGroup = {
function useNotifications(privateUser: PrivateUser) { function useNotifications(privateUser: PrivateUser) {
const result = useFirestoreQueryData( const result = useFirestoreQueryData(
['notifications-all', privateUser.id], ['notifications-all', privateUser.id],
getNotificationsQuery(privateUser.id), getNotificationsQuery(privateUser.id)
{ subscribe: true, includeMetadataChanges: true },
// Temporary workaround for react-query bug:
// https://github.com/invertase/react-query-firebase/issues/25
{ refetchOnMount: 'always' }
) )
const notifications = useMemo(() => { const notifications = useMemo(() => {