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[]
|
closingSoonContracts: Contract[]
|
||||||
}) => {
|
}) => {
|
||||||
const {
|
const {
|
||||||
|
activeContracts,
|
||||||
activeContractBets,
|
activeContractBets,
|
||||||
activeContractComments,
|
activeContractComments,
|
||||||
hotContracts,
|
hotContracts,
|
||||||
|
@ -71,15 +72,14 @@ const Home = (props: {
|
||||||
|
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
|
|
||||||
const initialActiveContracts = props.activeContracts ?? []
|
// const initialActiveContracts = props.activeContracts ?? []
|
||||||
|
// const contracts = useContracts()
|
||||||
const contracts = useContracts()
|
// const recentComments = useRecentComments()
|
||||||
const recentComments = useRecentComments()
|
// const activeContracts =
|
||||||
|
// recentComments && contracts
|
||||||
const activeContracts =
|
// ? findActiveContracts(contracts, recentComments)
|
||||||
recentComments && contracts
|
// : initialActiveContracts
|
||||||
? findActiveContracts(contracts, recentComments)
|
// TODO: get activeContractBets, activeContractComments associated with activeContracts
|
||||||
: initialActiveContracts
|
|
||||||
|
|
||||||
if (user === null) {
|
if (user === null) {
|
||||||
Router.replace('/')
|
Router.replace('/')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user