From 66add707a0f7ae9cffa98fdd65a5e9f982789837 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 30 Mar 2022 10:59:41 -0700 Subject: [PATCH] Remove the top navbar entirely --- web/components/nav/manifold-logo.tsx | 53 +++++++++++++++------------- web/components/nav/nav-bar.tsx | 17 +++++---- web/components/nav/sidebar.tsx | 12 +++++++ web/components/page.tsx | 8 ++--- 4 files changed, 55 insertions(+), 35 deletions(-) diff --git a/web/components/nav/manifold-logo.tsx b/web/components/nav/manifold-logo.tsx index 5043f7b0..efe6358f 100644 --- a/web/components/nav/manifold-logo.tsx +++ b/web/components/nav/manifold-logo.tsx @@ -7,8 +7,9 @@ import { ENV_CONFIG } from '../../../common/envs/constants' export function ManifoldLogo(props: { className?: string darkBackground?: boolean + hideText?: boolean }) { - const { darkBackground, className } = props + const { darkBackground, className, hideText } = props const user = useUser() @@ -21,30 +22,32 @@ export function ManifoldLogo(props: { width={45} height={45} /> - {ENV_CONFIG.navbarLogoPath ? ( - - ) : ( - <> -
- Manifold -
- Markets -
- - - )} + + {!hideText && + (ENV_CONFIG.navbarLogoPath ? ( + + ) : ( + <> +
+ Manifold +
+ Markets +
+ + + ))} ) diff --git a/web/components/nav/nav-bar.tsx b/web/components/nav/nav-bar.tsx index 19786b15..27793b74 100644 --- a/web/components/nav/nav-bar.tsx +++ b/web/components/nav/nav-bar.tsx @@ -13,6 +13,7 @@ import { UserGroupIcon, } from '@heroicons/react/outline' +// Deprecated. TODO: Remove this entirely. export function NavBar(props: { darkBackground?: boolean wide?: boolean @@ -49,14 +50,17 @@ export function NavBar(props: { - {user && } + ) } // From https://codepen.io/chris__sev/pen/QWGvYbL -function BottomNavBar(props: { user: User }) { - const { user } = props +export function BottomNavBar() { + const user = useUser() + if (!user) { + return null + } return (