diff --git a/web/components/feed-create.tsx b/web/components/feed-create.tsx index 1035b91c..7ce1deb5 100644 --- a/web/components/feed-create.tsx +++ b/web/components/feed-create.tsx @@ -46,7 +46,7 @@ export function FeedPromo(props: { hotContracts: Contract[] }) { doc.data() as Contract) + return _.sortBy(contracts, (contract) => -1 * contract.volume24Hours) +} + const topWeeklyQuery = query( contractCollection, where('isResolved', '==', false), diff --git a/web/pages/index.tsx b/web/pages/index.tsx index 57c72a8d..eb954f3c 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -1,7 +1,7 @@ import React from 'react' import Router from 'next/router' -import { Contract, getHotContracts } from '../lib/firebase/contracts' +import { Contract, getContractsBySlugs } from '../lib/firebase/contracts' import { Page } from '../components/page' import { FeedPromo } from '../components/feed-create' import { Col } from '../components/layout/col' @@ -9,7 +9,16 @@ import { useUser } from '../hooks/use-user' import { ManifoldLogo } from '../components/nav/manifold-logo' export async function getStaticProps() { - const hotContracts = (await getHotContracts().catch(() => [])) ?? [] + const hotContracts = await getContractsBySlugs([ + 'if-boris-johnson-is-leader-of-the-c', + 'will-ethereum-merge-to-proofofstake', + 'will-russia-control-the-majority-of', + 'will-elon-musk-buy-twitter-this-yea', + 'will-an-ai-get-gold-on-any-internat', + 'how-many-us-supreme-court-justices', + 'who-will-win-the-nba-finals-champio', + 'what-database-will-manifold-be-prim', + ]) return { props: { hotContracts },