Skip to content

Commit

Permalink
show dev env prominently
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 committed Jul 21, 2024
1 parent ae1241e commit 751e669
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions clientv2/src/components/Navbar/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface LogoBadgeProps {
}

const LogoBadge: React.FC<LogoBadgeProps> = ({ size, linkTo, showText }) => {
const isNonProd = import.meta.env.VITE_RUN_ENVIRONMENT !== 'prod';
if (!showText) {
showText = true;
}
Expand All @@ -22,13 +23,13 @@ const LogoBadge: React.FC<LogoBadgeProps> = ({ size, linkTo, showText }) => {
style={{
fontSize: size,
textDecoration: 'none',
color: '#0053B3',
color: isNonProd ? 'red' : '#0053B3',
display: 'flex',
alignItems: 'center',
}}
>
<img src={brandImgUrl} alt="ACM Logo" style={{ height: '3em', marginRight: '0.5em' }} />
{showText ? 'Resume Book' : null}
{showText ? isNonProd ? `Resume Book ${import.meta.env.VITE_RUN_ENVIRONMENT.toUpperCase()} ENV` : 'Resume Book' : null}
</Link>
</b>
);
Expand Down
2 changes: 0 additions & 2 deletions clientv2/src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ const isActiveLink = (path: string) => location.pathname === path;

const HeaderNavbar: React.FC<HeaderNavbarProps> = ({ userData }) => {
const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure(false);

return (
<Box>
<header className={classes.header}>
<Group justify="space-between" align="center" h="100%">
<Group justify="start" align="center" h="100%" gap={10}>
<LogoBadge />
{/* <Badge color="red">Beta</Badge> */}
<Group justify="start" align="center" h="100%" gap={10} visibleFrom="sm">
{userData?.role === AuthRoleEnum.STUDENT ? (
<a href="/profile" className={classes.link}>
Expand Down

0 comments on commit 751e669

Please sign in to comment.