From a804cc95a47e809e728da57714b9d978b4a592a4 Mon Sep 17 00:00:00 2001 From: Farahnaz Hoque <107436970+farahnazhoque@users.noreply.github.com> Date: Sun, 28 Apr 2024 12:14:07 -0700 Subject: [PATCH] 178 done --- src/components/Navbar/Navbar.jsx | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 68a08be..ed12b2a 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -18,6 +18,8 @@ import { SupportIconGrey, SettingsIconGrey, LogOutIcon, + QRCodeIconGrey, + QRCodeIconBlue, } from '../Icons/NavbarIcons'; import { CloseIcon } from '@chakra-ui/icons'; @@ -39,6 +41,7 @@ const NavbarButton = ({ buttonText, path, navigate, UnfocusedIcon, FocusedIcon } marginBottom="6px" backgroundColor={location.pathname === path ? '#D4E4F9' : 'transparent'} borderRadius="4px" + cursor="pointer" onClick={e => { e.preventDefault(); navigate(path); @@ -78,7 +81,7 @@ const Navbar = () => { // Change the paths for each button since these might change const homePath = '/'; const eventsPath = '/event'; - const archivedEventsPath = '/archived-events'; + const archivedEventsPath = '/past-events'; const volunteersPath = '/volunteers'; // For the support and settings button at the bottom above the user @@ -87,6 +90,8 @@ const Navbar = () => { // For logout in case it changes from /logoutv2 const logoutPath = '/loginv2'; + // QR code path + const qrPath = '/qr'; // For navigating to the user profile when you click on it // at the bottom @@ -110,7 +115,7 @@ const Navbar = () => { alignItems="start" > {/* Box containing everything above "support" */} - + {/* Box containing the logo and role title at the top */} { navigate={navigate} FocusedIcon={HomeIconBlue} UnfocusedIcon={HomeIconGrey} - /> + /> + {/* Current Events button */} { /> {/* Conditional rendering based on the role */} - {role === 'admin' && ( + {role === 'admin' ? ( <> {/* Archived Events button */} { UnfocusedIcon={VolunteersIconGrey} /> + ) : ( + )} {/* Bottom of navbar, support and below */} @@ -348,4 +362,4 @@ const Navbar = () => { ); }; -export default Navbar; +export default Navbar; \ No newline at end of file