From 3043751ba11a38ebd9f03416fd7f4600dae41f1a Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Mon, 17 Sep 2018 13:24:41 +0200
Subject: production routing shit

---
 app/client/index.jsx | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

(limited to 'app/client/index.jsx')

diff --git a/app/client/index.jsx b/app/client/index.jsx
index 33e4148..0b0ed05 100644
--- a/app/client/index.jsx
+++ b/app/client/index.jsx
@@ -19,20 +19,25 @@ const module_list = Object.keys(modules).map(name => {
   )
 })
 
+const ModuleRouter = () => {
+  return (
+    <Switch></Switch>
+  )  
+}
+
 const app = (
   <Provider store={store}>
     <Auth.Gate>
       <BrowserRouter>
-        <div>
-          <Switch>
-            <Route exact path='/' component={Dashboard} />
-            <Route exact path='/system/' component={System} />
-            <Route exact path='/dashboard/' component={Dashboard} />
-            {module_list}
-            <Route exact path='/logout/' component={Auth.Logout} />
-            <Redirect from='/login/' to='/' />
-            <Redirect from='/signup/' to='/' />
-          </Switch>
+        <div className='everybody'>
+          <Route path='/' children={(props) => <div>{console.log(props.location.pathname)}</div>} />
+          <Route exact path='/system' component={System} />
+          <Route exact path='/dashboard' component={Dashboard} />
+          <Route exact path='/logout' component={Auth.Logout} />
+          <Route exact path='/login' component={() => { console.log('pziss'); <Redirect to='/' /> }} />
+          <Route exact path='/signup' component={() => { console.log('pziss'); <Redirect to='/' /> }} />
+          {module_list}
+          <Route exact path='/' component={Dashboard} />
           <Route path='/' component={Header} />
         </div>
       </BrowserRouter>
-- 
cgit v1.2.3-70-g09d2

