Show unresolved markets first in fold
This commit is contained in:
parent
bc3e43802b
commit
0e3e4b8192
|
@ -33,11 +33,17 @@ export async function getStaticProps(props: { params: { foldSlug: string } }) {
|
|||
contracts.map((contract) => listAllComments(contract.id).catch((_) => []))
|
||||
)
|
||||
|
||||
const activeContracts = findActiveContracts(
|
||||
let activeContracts = findActiveContracts(
|
||||
contracts,
|
||||
_.flatten(contractComments),
|
||||
365
|
||||
)
|
||||
const [resolved, unresolved] = _.partition(
|
||||
activeContracts,
|
||||
({ isResolved }) => isResolved
|
||||
)
|
||||
activeContracts = [...unresolved, ...resolved]
|
||||
|
||||
const activeContractBets = await Promise.all(
|
||||
activeContracts.map((contract) => listAllBets(contract.id).catch((_) => []))
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user