2022-09-02 02:38:09 +00:00
|
|
|
import { usePrefetchUserBetContracts } from './use-contracts'
|
|
|
|
import { usePrefetchPortfolioHistory } from './use-portfolio-history'
|
2022-09-16 21:35:03 +00:00
|
|
|
import { usePrefetchProbChanges } from './use-prob-changes'
|
2022-09-02 02:38:09 +00:00
|
|
|
import { usePrefetchUserBets } from './use-user-bets'
|
2022-08-28 23:03:00 +00:00
|
|
|
|
|
|
|
export function usePrefetch(userId: string | undefined) {
|
|
|
|
const maybeUserId = userId ?? ''
|
2022-09-02 02:38:09 +00:00
|
|
|
return Promise.all([
|
|
|
|
usePrefetchUserBets(maybeUserId),
|
|
|
|
usePrefetchUserBetContracts(maybeUserId),
|
|
|
|
usePrefetchPortfolioHistory(maybeUserId, 'weekly'),
|
2022-09-16 21:35:03 +00:00
|
|
|
usePrefetchProbChanges(userId),
|
2022-09-02 02:38:09 +00:00
|
|
|
])
|
2022-08-28 23:03:00 +00:00
|
|
|
}
|