summaryrefslogtreecommitdiff
path: root/app/client/index.jsx
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-09-16 22:40:05 +0200
committerJules Laplace <julescarbon@gmail.com>2018-09-16 22:40:05 +0200
commitd3e4bb3ed2585859a3adeb7eeff35b7c75ebd840 (patch)
treee88e9edae5a63328fb1acc625e5624990717d20f /app/client/index.jsx
parent189be96150fbd49766228cf50c6a89279542565c (diff)
auth gate on main app. pull in auth routes from bucky.
Diffstat (limited to 'app/client/index.jsx')
-rw-r--r--app/client/index.jsx27
1 files changed, 15 insertions, 12 deletions
diff --git a/app/client/index.jsx b/app/client/index.jsx
index fd4679c..614bb35 100644
--- a/app/client/index.jsx
+++ b/app/client/index.jsx
@@ -7,8 +7,8 @@ import { store, history } from './store'
import * as socket from './socket'
import util from './util'
-import Header from './common/header.component'
-import AudioPlayer from './common/audioPlayer/audioPlayer.component'
+import Auth from './auth'
+import { Header, AudioPlayer } from './common'
import System from './system/system.component'
import Dashboard from './dashboard/dashboard.component'
import modules from './modules'
@@ -22,16 +22,19 @@ const module_list = Object.keys(modules).map(name => {
const app = (
<Provider store={store}>
- <BrowserRouter>
- <div>
- <Route exact path='/' component={Dashboard} />
- <Route path='/system/' component={System} />
- <Route path='/dashboard/' component={Dashboard} />
- {module_list}
- <Route path='/' component={Header} />
- <AudioPlayer />
- </div>
- </BrowserRouter>
+ <Auth.Gate>
+ <BrowserRouter>
+ <div>
+ <Route exact path='/' component={Dashboard} />
+ <Route path='/system/' component={System} />
+ <Route path='/dashboard/' component={Dashboard} />
+ <Route path='/logout/' component={Auth.Logout} />
+ {module_list}
+ <Route path='/' component={Header} />
+ <AudioPlayer />
+ </div>
+ </BrowserRouter>
+ </Auth.Gate>
</Provider>
)