From 6f51e21b5898c4178968d0f9d4d757e2bbf80705 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 28 Jan 2023 16:46:48 -0800 Subject: [PATCH] Don't show Header context when there is an error --- components/Header/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/Header/index.tsx b/components/Header/index.tsx index de1c5810..57a27956 100644 --- a/components/Header/index.tsx +++ b/components/Header/index.tsx @@ -10,7 +10,6 @@ import Link from 'next/link' import api from '~utils/api' import { accountState, initialAccountState } from '~utils/accountState' import { appState } from '~utils/appState' -import capitalizeFirstLetter from '~utils/capitalizeFirstLetter' import { DropdownMenu, @@ -303,7 +302,7 @@ const Header = () => { - {pageTitle()} + {!appState.errorCode ? pageTitle() : ''} ) } @@ -313,10 +312,13 @@ const Header = () => {
{router.route === '/p/[party]' && account.user && - (!party.user || party.user.id !== account.user.id) + (!party.user || party.user.id !== account.user.id) && + !appState.errorCode ? saveButton() : ''} - {router.route === '/p/[party]' ? remixButton() : ''} + {router.route === '/p/[party]' && !appState.errorCode + ? remixButton() + : ''}