diff --git a/web/components/loading-indicator.tsx b/web/components/loading-indicator.tsx new file mode 100644 index 00000000..0cfa01af --- /dev/null +++ b/web/components/loading-indicator.tsx @@ -0,0 +1,16 @@ +import clsx from 'clsx' + +export function LoadingIndicator(props: { className?: string }) { + const { className } = props + + return ( +
+
+ Loading... +
+
+ ) +} diff --git a/web/pages/home.tsx b/web/pages/home.tsx index 61d785e4..187706d2 100644 --- a/web/pages/home.tsx +++ b/web/pages/home.tsx @@ -16,6 +16,7 @@ import { getFollowedFolds, listAllFolds } from '../lib/firebase/folds' import { Fold } from '../../common/fold' import { filterDefined } from '../../common/util/array' import { useUserBets } from '../hooks/use-user-bets' +import { LoadingIndicator } from '../components/loading-indicator' export async function getStaticProps() { const [contracts, folds] = await Promise.all([ @@ -136,7 +137,9 @@ const Home = (props: { contracts: Contract[]; folds: Fold[] }) => { contractBets={contractBets} contractComments={contractComments} /> - ) : null} + ) : ( + + )}