Skip to content

Commit

Permalink
WG407 Add FeatureFlags context - updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AlinaGoaga committed Feb 23, 2022
1 parent 193a6e1 commit 12b526c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ const LOG_OUT = "/oauth2/logout";
const AUTH_PATH_SIGNIN = "/sign_in";

export const AuthCheck = ({ children }) => {
const { authFlag } = React.useContext(FeatureFlags);

if (!authFlag) {
return children;
}

const { loading, userInfo } = React.useContext(Auth);

// Wait until userInfo is loaded before showing signin or app content
Expand Down

0 comments on commit 12b526c

Please sign in to comment.