home: remove incomplete loading of contract data
This commit is contained in:
parent
7c124c1390
commit
fd03eb841f
|
@ -63,6 +63,7 @@ const Home = (props: {
|
|||
closingSoonContracts: Contract[]
|
||||
}) => {
|
||||
const {
|
||||
activeContracts,
|
||||
activeContractBets,
|
||||
activeContractComments,
|
||||
hotContracts,
|
||||
|
@ -71,15 +72,14 @@ const Home = (props: {
|
|||
|
||||
const user = useUser()
|
||||
|
||||
const initialActiveContracts = props.activeContracts ?? []
|
||||
|
||||
const contracts = useContracts()
|
||||
const recentComments = useRecentComments()
|
||||
|
||||
const activeContracts =
|
||||
recentComments && contracts
|
||||
? findActiveContracts(contracts, recentComments)
|
||||
: initialActiveContracts
|
||||
// const initialActiveContracts = props.activeContracts ?? []
|
||||
// const contracts = useContracts()
|
||||
// const recentComments = useRecentComments()
|
||||
// const activeContracts =
|
||||
// recentComments && contracts
|
||||
// ? findActiveContracts(contracts, recentComments)
|
||||
// : initialActiveContracts
|
||||
// TODO: get activeContractBets, activeContractComments associated with activeContracts
|
||||
|
||||
if (user === null) {
|
||||
Router.replace('/')
|
||||
|
|
Loading…
Reference in New Issue
Block a user