From 1061f35f50508a5d138567ca4edada2c9af43aad Mon Sep 17 00:00:00 2001 From: shalluv Date: Mon, 8 Jan 2024 11:59:58 +0700 Subject: [PATCH 1/2] fix(nav): missing underline and keys in animate presence --- src/components/Nav.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/Nav.tsx b/src/components/Nav.tsx index bb7918b..12b9840 100644 --- a/src/components/Nav.tsx +++ b/src/components/Nav.tsx @@ -72,12 +72,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 ( { 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 ( Date: Mon, 8 Jan 2024 12:01:00 +0700 Subject: [PATCH 2/2] fix(animate): missing keys in animate presence elems --- src/components/Event/Container.tsx | 1 + src/components/Faculties/Selector.tsx | 1 + 2 files changed, 2 insertions(+) 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 !== "") && ( = ({