Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navbar can check state for loggedIn instead of checking location #109

Open
tomduggan85 opened this issue Mar 23, 2018 · 1 comment
Open

Comments

@tomduggan85
Copy link

if (location.pathname !== '/') {

Instead of checking for a specific location path, this check might be more robust if it checked the redux store for loginResult.loggedIn (or look for the login cookie, in the future) to decide whether to show the navbar. This way, you could have additional "logged-out" pages and paths, i.e. mpcc-assistant.com/signup, mpcc-assistant.com/signin, mpcc-assistant.com/forgotpassword and the navbar would handle those pages.

@sultanassi95
Copy link
Member

Oh, I just asked you on the other issue to help with that 😃
I now see a proper way to do this!

Great Tom!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants