Sort bets/comments on client. Somehow server order is getting flipped?
This commit is contained in:
parent
8f40350a75
commit
c48913d91e
|
@ -14,9 +14,7 @@ export const useBets = (contractId: string) => {
|
|||
|
||||
export const useBetsWithoutAntes = (contract: Contract, initialBets: Bet[]) => {
|
||||
const [bets, setBets] = useState<Bet[]>(
|
||||
withoutAnteBets(contract, initialBets).sort(
|
||||
(bet1, bet2) => bet1.createdTime - bet2.createdTime
|
||||
)
|
||||
withoutAnteBets(contract, initialBets)
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user