One of the navlinks not updating after log in
https://github.com/Aman2980/S2-23_Website
Here is a link to the project. In the header on each page I have this nav-item
In the common.css file I set
to hidden by default. Then inside login.js im selecting that item with
const statsNavItem = document.querySelector('.nav-link.stats');
and changing its state based on some conditions
Now my issue is that this statistics page should appear when someone logs in. It does appear but can be accessed from login page and it hidden from each page. How can i make it visible on each page when someone logs in?
GitHub
GitHub - Aman2980/S2-23_Website
Contribute to Aman2980/S2-23_Website development by creating an account on GitHub.
1 Reply
You can test it out on this website https://main--s2-23.netlify.app/
Go to login page and use you name as username and reverse of your name as password
now it should take you to stats.html but the statistics navitem is not visible
but as soon as you click on login in the navbar, its visible and if you click on statistics, its hidden again
and its not even visible from other pages