Code-Society-Lab / cursif-web

React client for Cursif
2 stars 5 forks source link

Refactor navigation component and fix button display bug #44

Closed chrisdedman closed 3 months ago

chrisdedman commented 3 months ago

This pull request refactors the navigation component and fixes a bug that was causing buttons not to be displayed during any navigation actions.

For example, http://localhost:3000/login should display the Sign In button, but the way we were using useEffect did not render the action list properly. This is fixed by using the useEffect only on the token before checking the path and actions by accessing localStorage only on the client side.