Skip to content

Commit

Permalink
[Upd #126] Put navigation within OIDC Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed May 16, 2024
1 parent a52e127 commit d59caba
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions src/components/routes/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,29 @@ const AppRoutes = () => {
return (
<LoggedUserProvider>
<BrowserRouter basename={ENVVariable.BASENAME} /*history={appHistory}*/>
<Navigation>
<Routes>
<Route path={ROUTES.OIDC_SIGNIN_CALLBACK} element={<OidcSignInCallback />} />
<Route path={ROUTES.OIDC_SILENT_CALLBACK} element={<OidcSilentCallback />} />
<Routes>
<Route path={ROUTES.OIDC_SIGNIN_CALLBACK} element={<OidcSignInCallback />} />
<Route path={ROUTES.OIDC_SILENT_CALLBACK} element={<OidcSilentCallback />} />

{routes.map((r) => {
if (isUsingOidcAuth()) {
return <Route path={r.path} element={<OidcAuthWrapper>{r.element}</OidcAuthWrapper>} />;
} else {
return <Route key={r.path} path={r.path} element={getElement(r.path, r.element)} />;
}
})}
</Routes>
</Navigation>
{routes.map((r) => {
if (isUsingOidcAuth()) {
return (
<Route
path={r.path}
element={
<OidcAuthWrapper>
<Navigation>{r.element}</Navigation>
</OidcAuthWrapper>
}
/>
);
} else {
return (
<Route key={r.path} path={r.path} element={<Navigation>{getElement(r.path, r.element)}</Navigation>} />
);
}
})}
</Routes>
</BrowserRouter>
</LoggedUserProvider>
);
Expand Down

0 comments on commit d59caba

Please sign in to comment.