Skip to content

Commit

Permalink
Merge pull request #5 from akshay9085/main
Browse files Browse the repository at this point in the history
code updated
  • Loading branch information
Sashi20 authored Nov 19, 2024
2 parents d5f5c26 + 90dc972 commit 8bd5fa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/layout/Nav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/nav-links.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit 8bd5fa0

Please sign in to comment.