Skip to content

Commit

Permalink
Merge pull request #157 from UAlberta-CMPUT401/feature/auth
Browse files Browse the repository at this point in the history
Feature/auth
  • Loading branch information
chasejohnson626 authored Dec 3, 2024
2 parents 9504c63 + 6bcd48f commit 4d32701
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Binary file added frontend/src/assets/BHAS-Logo-White.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions frontend/src/components/layout/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import MenuItem from '@mui/material/MenuItem';
import React from "react";
import { Link, Outlet } from 'react-router-dom';
import BHASLogo from '@assets/BHAS-Logo.png';
import BHASLogoLight from '@assets/BHAS-Logo-White.png'
import { useTheme } from "@mui/material/styles";

type Page = {
name: string;
Expand All @@ -23,6 +25,10 @@ const pages: Page[] = [

const TopBar: React.FC = () => {
const [anchorElNav, setAnchorElNav] = React.useState<null | HTMLElement>(null);
const theme = useTheme();
const isDarkMode = theme.palette.mode === "dark";

const logo = isDarkMode ? BHASLogo : BHASLogoLight;

const handleOpenNavMenu = (event: React.MouseEvent<HTMLElement>) => {
setAnchorElNav(event.currentTarget);
Expand All @@ -40,7 +46,7 @@ const TopBar: React.FC = () => {

<Box className="logo-container" sx={{ display: { xs: 'none', md: 'flex'}, alignItems: 'center' }}>
<img
src={BHASLogo}
src={logo}
alt="Logo"
className="navbar-logo"
style={{ height: '50px', marginRight: '20px', cursor: 'pointer' }}
Expand Down Expand Up @@ -119,7 +125,7 @@ const TopBar: React.FC = () => {
</Box>
<Box className="logo-container" sx={{ display: { xs: 'flex', md: 'none'}, alignItems: 'center' }}>
<img
src={BHASLogo}
src={logo}
alt="Logo"
className="navbar-logo"
style={{ height: '50px', marginRight: '20px', cursor: 'pointer' }}
Expand Down

0 comments on commit 4d32701

Please sign in to comment.