diff --git a/src/components/Event/Container.tsx b/src/components/Event/Container.tsx index e8b0816..8a8c313 100644 --- a/src/components/Event/Container.tsx +++ b/src/components/Event/Container.tsx @@ -116,6 +116,7 @@ const Container: React.FC = ({ events, faculty }) => { {(selectedFaculty !== 0 || searchQuery !== "") && ( = ({ {
{links.map((link) => { - const path = link === "Home" ? "/" : "/" + link.toLowerCase(); - const isCurrentPath = path === window.location.pathname; + const path = link === "Home" ? "" : link.toLowerCase(); + const isCurrentPath = + path === window.location.pathname.replaceAll("/", ""); return ( { initial="initial" animate="animate" exit="initial" + key="overlay" transition={{ delayChildren: 0.2, staggerChildren: 0.1, @@ -122,12 +124,13 @@ const Nav = () => { >
{links.map((link) => { - const path = link === "Home" ? "/" : "/" + link.toLowerCase(); - const isCurrentPath = path === window.location.pathname; + const path = link === "Home" ? "" : link.toLowerCase(); + const isCurrentPath = + path === window.location.pathname.replaceAll("/", ""); return (