Preserve feed ordering based on initial fetch of bets
This commit is contained in:
parent
04de95337a
commit
4169b335d8
|
@ -22,7 +22,7 @@ import {
|
||||||
useFilterYourContracts,
|
useFilterYourContracts,
|
||||||
useFindActiveContracts,
|
useFindActiveContracts,
|
||||||
} from '../hooks/use-find-active-contracts'
|
} from '../hooks/use-find-active-contracts'
|
||||||
import { useRecentBets } from '../hooks/use-bets'
|
import { useGetRecentBets, useRecentBets } from '../hooks/use-bets'
|
||||||
import { useActiveContracts } from '../hooks/use-contracts'
|
import { useActiveContracts } from '../hooks/use-contracts'
|
||||||
import { useRecentComments } from '../hooks/use-comments'
|
import { useRecentComments } from '../hooks/use-comments'
|
||||||
|
|
||||||
|
@ -50,12 +50,13 @@ const Home = (props: {
|
||||||
contracts
|
contracts
|
||||||
)
|
)
|
||||||
|
|
||||||
const recentBets = useRecentBets()
|
const initialRecentBets = useGetRecentBets()
|
||||||
|
const recentBets = useRecentBets() ?? initialRecentBets
|
||||||
const recentComments = useRecentComments() ?? props.recentComments
|
const recentComments = useRecentComments() ?? props.recentComments
|
||||||
|
|
||||||
const { activeContracts } = useFindActiveContracts({
|
const { activeContracts } = useFindActiveContracts({
|
||||||
contracts: yourContracts,
|
contracts: yourContracts,
|
||||||
recentBets: recentBets ?? [],
|
recentBets: initialRecentBets ?? [],
|
||||||
recentComments,
|
recentComments,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user