diff --git a/web/components/nav-bar.tsx b/web/components/nav-bar.tsx index 216a626a..2757b46e 100644 --- a/web/components/nav-bar.tsx +++ b/web/components/nav-bar.tsx @@ -10,11 +10,10 @@ import { ProfileMenu } from './profile-menu' export function NavBar(props: { darkBackground?: boolean wide?: boolean - isLandingPage?: boolean className?: string children?: any }) { - const { darkBackground, wide, isLandingPage, className, children } = props + const { darkBackground, wide, className, children } = props const user = useUser() @@ -27,7 +26,7 @@ export function NavBar(props: { @@ -48,18 +47,16 @@ export function NavBar(props: { )} - {!isLandingPage && ( - - - - )} + + + {user ? ( diff --git a/web/pages/index.tsx b/web/pages/index.tsx index a641b6b9..d644a3f6 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -1,12 +1,10 @@ import React from 'react' import _ from 'lodash' -import { useUser } from '../hooks/use-user' import { Contract, getHotContracts, listAllContracts, } from '../lib/firebase/contracts' -import LandingPage from './landing-page' import { ContractsGrid } from '../components/contracts-list' import { Spacer } from '../components/layout/spacer' import { Page } from '../components/page' @@ -37,16 +35,8 @@ const Home = (props: { hotContracts: Contract[] recentComments: Comment[] }) => { - const user = useUser() - - if (user === undefined) return <> - const { contracts, hotContracts, recentComments } = props - if (user === null) { - return - } - return (
diff --git a/web/pages/landing-page.tsx b/web/pages/landing-page.tsx index 12f2e675..b4c6aa5b 100644 --- a/web/pages/landing-page.tsx +++ b/web/pages/landing-page.tsx @@ -34,7 +34,7 @@ const scrollToAbout = () => { function Hero() { return (
- +