diff --git a/web/hooks/use-bets.ts b/web/hooks/use-bets.ts index 0b6b9293..03a0cb49 100644 --- a/web/hooks/use-bets.ts +++ b/web/hooks/use-bets.ts @@ -14,9 +14,7 @@ export const useBets = (contractId: string) => { export const useBetsWithoutAntes = (contract: Contract, initialBets: Bet[]) => { const [bets, setBets] = useState( - withoutAnteBets(contract, initialBets).sort( - (bet1, bet2) => bet1.createdTime - bet2.createdTime - ) + withoutAnteBets(contract, initialBets) ) useEffect(() => { diff --git a/web/pages/[username]/[contractSlug].tsx b/web/pages/[username]/[contractSlug].tsx index 98c314a4..08cbb337 100644 --- a/web/pages/[username]/[contractSlug].tsx +++ b/web/pages/[username]/[contractSlug].tsx @@ -82,6 +82,10 @@ export default function ContractPage(props: { const contract = useContractWithPreload(props.slug, props.contract) const { bets, comments } = props + // Sort for now to see if bug is fixed. + comments.sort((c1, c2) => c1.createdTime - c2.createdTime) + bets.sort((bet1, bet2) => bet1.createdTime - bet2.createdTime) + const folds = (useFoldsWithTags(contract?.tags) ?? props.folds).filter( (fold) => fold.followCount > 1 || user?.id === fold.curatorId )