From bc5cd5be451922dd53ff8cef355821716f91503b Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Fri, 13 May 2022 18:07:44 -0700 Subject: [PATCH] Clean up some markup in the sidebar (#220) * Remove wrapper div around logo * Small refactor, remove wrapper around sidebar profile summary * Remove random unused imports * Replace random styles with Tailwind classes --- web/components/nav/profile-menu.tsx | 20 ++++++++++---------- web/components/nav/sidebar.tsx | 20 +++----------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/web/components/nav/profile-menu.tsx b/web/components/nav/profile-menu.tsx index b25603d4..0082e4ca 100644 --- a/web/components/nav/profile-menu.tsx +++ b/web/components/nav/profile-menu.tsx @@ -1,8 +1,8 @@ +import Link from 'next/link' import { firebaseLogout, User } from 'web/lib/firebase/users' import { formatMoney } from 'common/util/format' import { Avatar } from '../avatar' import { IS_PRIVATE_MANIFOLD } from 'common/envs/constants' -import { Row } from '../layout/row' export function getNavigationOptions(user?: User | null) { if (IS_PRIVATE_MANIFOLD) { @@ -27,18 +27,18 @@ export function getNavigationOptions(user?: User | null) { ] } -export function ProfileSummary(props: { user: User | undefined }) { +export function ProfileSummary(props: { user: User }) { const { user } = props return ( - - + + + -
-
{user?.name}
-
- {user ? formatMoney(Math.floor(user.balance)) : ' '} +
+
{user.name}
+
{formatMoney(Math.floor(user.balance))}
-
- +
+ ) } diff --git a/web/components/nav/sidebar.tsx b/web/components/nav/sidebar.tsx index f08403df..ad031f8e 100644 --- a/web/components/nav/sidebar.tsx +++ b/web/components/nav/sidebar.tsx @@ -1,9 +1,7 @@ import { HomeIcon, - UserGroupIcon, CakeIcon, SearchIcon, - ChatIcon, BookOpenIcon, DotsHorizontalIcon, CashIcon, @@ -126,26 +124,14 @@ export default function Sidebar(props: { className?: string }) { return (