Skip to content

Commit

Permalink
Merge pull request #4349 from StevenGastroSophy/master
Browse files Browse the repository at this point in the history
isSignedIn should be a boolean, not credentials token(string)
  • Loading branch information
netpro2k authored Jun 24, 2021
2 parents 3fb6008 + 46cacce commit 29dbb84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/react-components/auth/AuthContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function AuthContextProvider({ children, store }) {

const [context, setContext] = useState({
initialized: false,
isSignedIn: !!store.state.credentials && store.state.credentials.token,
isSignedIn: !!store.state.credentials && !!store.state.credentials.token,
isAdmin: configs.isAdmin(),
email: store.state.credentials && store.state.credentials.email,
userId: store.credentialsAccountId,
Expand All @@ -112,7 +112,7 @@ export function AuthContextProvider({ children, store }) {
const onStoreChanged = () => {
setContext(state => ({
...state,
isSignedIn: !!store.state.credentials && store.state.credentials.token,
isSignedIn: !!store.state.credentials && !!store.state.credentials.token,
isAdmin: configs.isAdmin(),
email: store.state.credentials && store.state.credentials.email,
userId: store.credentialsAccountId
Expand Down

0 comments on commit 29dbb84

Please sign in to comment.