Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into migrate_ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-WorkGH committed Feb 23, 2024
2 parents 7b7863c + 0a5da76 commit a46f987
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@gridsuite/commons-ui": "^0.43.0",
"@gridsuite/commons-ui": "^0.44.0",
"@hookform/resolvers": "^3.3.1",
"@mui/icons-material": "^5.5.1",
"@mui/lab": "^5.0.0-alpha.75",
Expand Down
18 changes: 15 additions & 3 deletions src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ const App: FunctionComponent = () => {
})
);

const [initialMatchSigninCallbackUrl] = useState(
useMatch({
path: '/sign-in-callback',
})
);

const initialize = useCallback((): Promise<UserManager | undefined> => {
if (process.env.REACT_APP_USE_AUTHENTICATION === 'true') {
return fetchAuthorizationCodeFlowFeatureFlag().then(
Expand All @@ -143,7 +149,8 @@ const App: FunctionComponent = () => {
initialMatchSilentRenewCallbackUrl != null,
fetch('idpSettings.json'),
fetchValidateUser,
authorizationCodeFlowEnabled
authorizationCodeFlowEnabled,
initialMatchSigninCallbackUrl != null
)
);
} else {
Expand All @@ -153,11 +160,16 @@ const App: FunctionComponent = () => {
() =>
new Promise((resolve) =>
window.setTimeout(() => resolve(true), 500)
)
),
initialMatchSigninCallbackUrl != null
);
}
// Note: initialMatchSilentRenewCallbackUrl and dispatch don't change
}, [initialMatchSilentRenewCallbackUrl, dispatch]);
}, [
initialMatchSilentRenewCallbackUrl,
dispatch,
initialMatchSigninCallbackUrl,
]);

useEffect(() => {
initialize()
Expand Down

0 comments on commit a46f987

Please sign in to comment.