From 07a7fc219b9b572b005a2b024014a6dc8b04819e Mon Sep 17 00:00:00 2001 From: jahooma Date: Thu, 13 Jan 2022 14:54:31 -0600 Subject: [PATCH] Axe landing page, show home feed --- web/components/nav-bar.tsx | 27 ++++++++++++--------------- web/pages/index.tsx | 10 ---------- web/pages/landing-page.tsx | 2 +- 3 files changed, 13 insertions(+), 26 deletions(-) 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 (
- +