From c9d6118f0c047149b3a79b53baab3ec804395ba0 Mon Sep 17 00:00:00 2001 From: NCanggoro Date: Tue, 3 Oct 2023 14:37:43 +0700 Subject: [PATCH] add protected routes for submissions --- src/app.tsx | 48 ++++++++++++++++++--------------- src/pages/Submissions/index.tsx | 9 +++++++ 2 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 src/pages/Submissions/index.tsx diff --git a/src/app.tsx b/src/app.tsx index b31c73b..1c261c1 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -4,36 +4,42 @@ import './app.css' import { DefaultLayout } from './layouts' import routes from './routes' import "yet-another-react-lightbox/styles.css"; -import { Login, NotFound } from './pages' +import { Login, NotFound, Submissions } from './pages' import { Provider } from 'react-redux' import { persistore, store } from './store/config' import { PersistGate } from 'redux-persist/integration/react' +import { ProtectedRoute } from './routes/ProtectedRoute' export function App() { return ( <> - - - - - } /> - }> - {routes.map(({ path, name, element }) => ( - <> - - - ))} - + + + + + } /> + }> + {routes.map(({ path, name, element }) => ( + <> + + + ))} + + + + } /> } /> - - - - + + + + + ) } diff --git a/src/pages/Submissions/index.tsx b/src/pages/Submissions/index.tsx new file mode 100644 index 0000000..a29679b --- /dev/null +++ b/src/pages/Submissions/index.tsx @@ -0,0 +1,9 @@ +function Submissions() { + return ( +
+

Submssions

+
+ ) +} + +export default Submissions; \ No newline at end of file