996b4795ea
* Convert useUserBets to react query * Fix duplicate key warnings * Fix react-query workaround to use refetchOnMount: always' * Use react query for portfolio history * Fix useUserBet workaround * Script to back fill unique bettors in all contracts * React query for user bet contracts, using uniqueBettorsId! * Prefetch user bets / portfolio data
12 lines
366 B
TypeScript
12 lines
366 B
TypeScript
import { useUserBetContracts } from './use-contracts'
|
|
import { usePortfolioHistory } from './use-portfolio-history'
|
|
import { useUserBets } from './use-user-bets'
|
|
|
|
export function usePrefetch(userId: string | undefined) {
|
|
const maybeUserId = userId ?? ''
|
|
|
|
useUserBets(maybeUserId)
|
|
useUserBetContracts(maybeUserId)
|
|
usePortfolioHistory(maybeUserId, 'weekly')
|
|
}
|