From 557a5795e08328f1d413cde2af7c603e9021c01c Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 27 Feb 2022 00:37:58 -0800 Subject: [PATCH] Ensure bottom nav only shows on party pages --- components/BottomHeader/index.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/BottomHeader/index.tsx b/components/BottomHeader/index.tsx index 31f6cab4..99dd5ba6 100644 --- a/components/BottomHeader/index.tsx +++ b/components/BottomHeader/index.tsx @@ -16,6 +16,7 @@ import { appState, initialAppState } from '~utils/appState' import { ButtonType } from '~utils/enums' import CrossIcon from '~public/icons/Cross.svg' +import { route } from 'next/dist/server/router' const BottomHeader = () => { const account = useSnapshot(accountState) @@ -64,10 +65,12 @@ const BottomHeader = () => { } const leftNav = () => { - if (app.party.detailsVisible) { - return () - } else { - return () + if (router.pathname === '/p/[party]') { + if (app.party.detailsVisible) { + return () + } else { + return () + } } }