From 29e112ae7dde4c6baeb85b2f2ab2b67c86364a54 Mon Sep 17 00:00:00 2001 From: William Petit Date: Thu, 26 Mar 2020 13:46:25 +0100 Subject: [PATCH] Ajout component AuthorizedRoute --- frontend/src/app.js | 3 ++- frontend/src/components/AuthorizedRoute.js | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/AuthorizedRoute.js diff --git a/frontend/src/app.js b/frontend/src/app.js index 69e0c39..56df924 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -8,6 +8,7 @@ import DashBoardDev from './pages/DashBoardDev'; import { ConnectedLogoutPage as LogoutPage } from './pages/logout'; import { connect } from 'react-redux'; import { history } from './util/history'; +import { AuthorizedRoute } from './components/AuthorizedRoute'; const LazyHomePage = React.lazy(() => import('./pages/home.lazy')); @@ -22,7 +23,7 @@ export class App extends Component { - + } /> diff --git a/frontend/src/components/AuthorizedRoute.js b/frontend/src/components/AuthorizedRoute.js new file mode 100644 index 0000000..9d7c6f5 --- /dev/null +++ b/frontend/src/components/AuthorizedRoute.js @@ -0,0 +1,7 @@ +import { Route } from 'react-router'; + +export function AuthorizedRoute({...props}) { + return ( + + ) +}