From 751e6692de612f7b5feb4b22a64307ba69046e94 Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Sat, 20 Jul 2024 20:01:05 -0400 Subject: [PATCH] show dev env prominently --- clientv2/src/components/Navbar/Logo.tsx | 5 +++-- clientv2/src/components/Navbar/index.tsx | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clientv2/src/components/Navbar/Logo.tsx b/clientv2/src/components/Navbar/Logo.tsx index 379ffb2..fc112fa 100644 --- a/clientv2/src/components/Navbar/Logo.tsx +++ b/clientv2/src/components/Navbar/Logo.tsx @@ -9,6 +9,7 @@ interface LogoBadgeProps { } const LogoBadge: React.FC = ({ size, linkTo, showText }) => { + const isNonProd = import.meta.env.VITE_RUN_ENVIRONMENT !== 'prod'; if (!showText) { showText = true; } @@ -22,13 +23,13 @@ const LogoBadge: React.FC = ({ size, linkTo, showText }) => { style={{ fontSize: size, textDecoration: 'none', - color: '#0053B3', + color: isNonProd ? 'red' : '#0053B3', display: 'flex', alignItems: 'center', }} > ACM Logo - {showText ? 'Resume Book' : null} + {showText ? isNonProd ? `Resume Book ${import.meta.env.VITE_RUN_ENVIRONMENT.toUpperCase()} ENV` : 'Resume Book' : null} ); diff --git a/clientv2/src/components/Navbar/index.tsx b/clientv2/src/components/Navbar/index.tsx index 14ee633..df12cf8 100644 --- a/clientv2/src/components/Navbar/index.tsx +++ b/clientv2/src/components/Navbar/index.tsx @@ -15,14 +15,12 @@ const isActiveLink = (path: string) => location.pathname === path; const HeaderNavbar: React.FC = ({ userData }) => { const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure(false); - return (
- {/* Beta */} {userData?.role === AuthRoleEnum.STUDENT ? (