From 2664eb3e474f5d03d1782c15673b774d68fb2c58 Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Mon, 28 May 2018 13:06:54 +0200
Subject: textInput/fileUpload

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

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

diff --git a/app/client/index.jsx b/app/client/index.jsx
index ae09534..c5abf91 100644
--- a/app/client/index.jsx
+++ b/app/client/index.jsx
@@ -7,21 +7,25 @@ import { store, history } from './store'
 import * as socket from './socket'
 
 import Header from './common/header.component'
-import Dashboard from './dashboard/dashboard.component'
 import System from './system/system.component'
-import Pix2Pix from './pix2pix'
+import Dashboard from './dashboard/dashboard.component'
+import modules from './modules'
+
+const module_list = Object.keys(modules).map(name => {
+  const module = modules[name]
+  return (
+    <Route path={'/' + module.name} component={module.router} />
+  )
+})
 
 const app = (
   <Provider store={store}>
     <BrowserRouter>
       <div>
         <Route exact path='/' component={Dashboard} />
-        <Route path='/datasets/' component={Dashboard} />
-        <Route path='/checkpoints/' component={Dashboard} />
-        <Route path='/results/' component={Dashboard} />
-        <Route path='/live/' component={Pix2Pix.Live} />
         <Route path='/system/' component={System} />
         <Route path='/dashboard/' component={Dashboard} />
+        {module_list}
         <Header />
       </div>
     </BrowserRouter>
-- 
cgit v1.2.3-70-g09d2

