Default option shown to a new user is "Logout"
akshatshah21 opened this issue · comments
I have observed that for a logged out user, the default option shown for auth is "Logout", even though the user has no auth token. The reason is the line 14 shown below. It checks localStorage.get('token')
for an empty string. It should instead check if it's null
COCWebsite/new_client/src/reducers/authReducer.js
Lines 12 to 18 in 9a8cc70
This might be the same issue as the one mentioned at the end of this comment
Thanks for this. Seems like a quick fix should be !!localStorage.getItem("token")
, to ensure we have truth values only. Do you mind putting up a PR for this?