diff --git a/layouts/general_layout/GeneralLayout.jsx b/layouts/general_layout/GeneralLayout.jsx index e53a2d3..0103675 100644 --- a/layouts/general_layout/GeneralLayout.jsx +++ b/layouts/general_layout/GeneralLayout.jsx @@ -46,6 +46,10 @@ const GeneralLayout = ({ children, pageName }) => { if (link.dataset.href === window.location.pathname) { link.classList.add("active-page"); } + + if (window.location.pathname.match(new RegExp(`${link.dataset.href}\\/.*`))) { + link.classList.add("active-page"); + } }); gsap.to("#main-content-wrapper", {