diff --git a/src/components/layout/Nav.astro b/src/components/layout/Nav.astro index f66ae42..fe542c0 100644 --- a/src/components/layout/Nav.astro +++ b/src/components/layout/Nav.astro @@ -15,8 +15,8 @@ document.addEventListener('DOMContentLoaded', () => { function addActiveClass() { if(window.location.hash){ - var currentUrl = window.location.pathname + window.location.hash; - console.log(currentUrl); + var currentUrl = window.location.pathname + window.location.hash.replace(/\/+$/, ''); + // console.log(currentUrl); } else{ var currentUrl = window.location.pathname.replace(/\/+$/, '') + window.location.hash; diff --git a/src/components/layout/nav-links.json b/src/components/layout/nav-links.json index f3914d7..3a5fdbe 100644 --- a/src/components/layout/nav-links.json +++ b/src/components/layout/nav-links.json @@ -2,7 +2,7 @@ { "label": "About", "href": "/#about" }, {"label": "Problem-Statement", "href": "/problem-statement"}, - {"label": "Submission Guidelines", "href": "/problem-statement#submission-guidelines"}, + {"label": "Submission Guidelines", "href": "/problem-statement/#submission-guidelines"}, {"label": "Register", "href": "/#register"}, {"label": "FAQs", "href": "/faq"},