home: remove incomplete loading of contract data

This commit is contained in:
mantikoros 2022-01-22 18:36:35 -06:00
parent 7c124c1390
commit fd03eb841f

View File

@ -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('/')