diff --git a/web/pages/index.tsx b/web/pages/index.tsx
index 76164807..6e4ba609 100644
--- a/web/pages/index.tsx
+++ b/web/pages/index.tsx
@@ -1,15 +1,28 @@
import React from 'react'
-import type { NextPage } from 'next'
import { useUser } from '../hooks/use-user'
import Markets from './markets'
import LandingPage from './landing-page'
+import { Contract, listAllContracts } from '../lib/firebase/contracts'
-const Home: NextPage = () => {
+export async function getStaticProps() {
+ const contracts = await listAllContracts().catch((_) => [])
+
+ return {
+ props: {
+ contracts,
+ },
+
+ revalidate: 60, // regenerate after a minute
+ }
+}
+
+const Home = (props: { contracts: Contract[] }) => {
const user = useUser()
if (user === undefined) return <>>
- return user ?