diff --git a/web/hooks/use-contracts.ts b/web/hooks/use-contracts.ts index f277a209..3ec1c56c 100644 --- a/web/hooks/use-contracts.ts +++ b/web/hooks/use-contracts.ts @@ -95,11 +95,7 @@ export const useUpdatedContracts = (contracts: Contract[] | undefined) => { export const useUserBetContracts = (userId: string) => { const result = useFirestoreQueryData( ['contracts', 'bets', userId], - getUserBetContractsQuery(userId), - { subscribe: true, includeMetadataChanges: true }, - // Temporary workaround for react-query bug: - // https://github.com/invertase/react-query-firebase/issues/25 - { refetchOnMount: 'always' } + getUserBetContractsQuery(userId) ) return result.data } diff --git a/web/hooks/use-portfolio-history.ts b/web/hooks/use-portfolio-history.ts index d5919783..d01ca29b 100644 --- a/web/hooks/use-portfolio-history.ts +++ b/web/hooks/use-portfolio-history.ts @@ -8,11 +8,7 @@ export const usePortfolioHistory = (userId: string, period: Period) => { const result = useFirestoreQueryData( ['portfolio-history', userId, cutoff], - getPortfolioHistoryQuery(userId, cutoff), - { subscribe: true, includeMetadataChanges: true }, - // Temporary workaround for react-query bug: - // https://github.com/invertase/react-query-firebase/issues/25 - { refetchOnMount: 'always' } + getPortfolioHistoryQuery(userId, cutoff) ) return result.data } diff --git a/web/hooks/use-user-bets.ts b/web/hooks/use-user-bets.ts index 72a4e5bf..ff1b23b3 100644 --- a/web/hooks/use-user-bets.ts +++ b/web/hooks/use-user-bets.ts @@ -9,11 +9,7 @@ import { export const useUserBets = (userId: string) => { const result = useFirestoreQueryData( ['bets', userId], - getUserBetsQuery(userId), - { subscribe: true, includeMetadataChanges: true }, - // Temporary workaround for react-query bug: - // https://github.com/invertase/react-query-firebase/issues/25 - { refetchOnMount: 'always' } + getUserBetsQuery(userId) ) return result.data }