Ajout d'une page 'Non autorisée' et redirection automatique vers celle ci en cas d'accès via un compte non autorisé

This commit is contained in:
2020-10-12 10:05:04 +02:00
parent 7a6eedab9d
commit 0859202987
4 changed files with 52 additions and 10 deletions

View File

@ -13,6 +13,7 @@ import { Modal } from './Modal';
import { createClient } from '../util/apollo';
import { ApolloProvider } from '@apollo/client';
import { LogoutPage } from './LogoutPage';
import { UnauthorizedPage } from './UnauthorizedPage/UnauthorizedPage';
export interface AppProps {
@ -41,6 +42,7 @@ export const App: FunctionComponent<AppProps> = () => {
<BrowserRouter>
<Switch>
<Route path="/" exact component={HomePage} />
<Route path="/unauthorized" exact component={UnauthorizedPage} />
<PrivateRoute path="/profile" exact component={ProfilePage} />
<PrivateRoute path="/workgroups/:id" exact component={WorkgroupPage} />
<PrivateRoute path="/decisions/:id" exact component={DecisionSupportFilePage} />