manifold/web/hooks/use-prefetch.ts
2022-08-31 21:59:58 -07:00

12 lines
396 B
TypeScript

import { prefetchUserBetContracts } from './use-contracts'
import { prefetchPortfolioHistory } from './use-portfolio-history'
import { prefetchUserBets } from './use-user-bets'
export function usePrefetch(userId: string | undefined) {
const maybeUserId = userId ?? ''
prefetchUserBets(maybeUserId)
prefetchUserBetContracts(maybeUserId)
prefetchPortfolioHistory(maybeUserId, 'weekly')
}