Show bets loading indictor instead of wrong data

This commit is contained in:
James Grugett 2022-05-31 22:21:45 -05:00
parent 9f1fe3ee17
commit dec286583a

View File

@ -59,7 +59,7 @@ export function BetsList(props: { user: User; hideBetsBefore?: number }) {
const allBets = useUserBets(user.id, { includeRedemptions: true }) const allBets = useUserBets(user.id, { includeRedemptions: true })
// Hide bets before 06-01-2022 if this isn't your own profile // Hide bets before 06-01-2022 if this isn't your own profile
// NOTE: This means public profits also begin on 06-01-2022 as well. // NOTE: This means public profits also begin on 06-01-2022 as well.
const bets = (allBets ?? []).filter( const bets = allBets?.filter(
(bet) => bet.createdTime >= (hideBetsBefore ?? 0) (bet) => bet.createdTime >= (hideBetsBefore ?? 0)
) )
const [contracts, setContracts] = useState<Contract[] | undefined>() const [contracts, setContracts] = useState<Contract[] | undefined>()