From 490734db00805cd86789a0443089693ff42b06e9 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Fri, 23 Sep 2022 16:43:23 -0400 Subject: [PATCH] If no user, show loading on home --- web/pages/home/index.tsx | 45 +++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/web/pages/home/index.tsx b/web/pages/home/index.tsx index c1a5f477..fda80c50 100644 --- a/web/pages/home/index.tsx +++ b/web/pages/home/index.tsx @@ -45,6 +45,7 @@ import { usePrefetch } from 'web/hooks/use-prefetch' import { Title } from 'web/components/title' import { CPMMBinaryContract } from 'common/contract' import { useContractsByDailyScoreGroups } from 'web/hooks/use-contracts' +import { LoadingIndicator } from 'web/components/loading-indicator' export default function Home() { const user = useUser() @@ -82,13 +83,17 @@ export default function Home() { - <> - {sections.map((section) => - renderSection(section, user, groups, groupContracts) - )} + {!user ? ( + + ) : ( + <> + {sections.map((section) => + renderSection(section, user, groups, groupContracts) + )} - - + + + )}