diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-05 19:10:55 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-05 19:10:55 +0100 |
| commit | 0907418ce2c6ca498b02e8e514e4945d79750467 (patch) | |
| tree | cdccf1157d01f5ead91a454d70e1f1769d945320 /animism-align/frontend/app/router.js | |
| parent | d5b6a4ea27f8c905e613363aab365066ad6d9cda (diff) | |
adding login view
Diffstat (limited to 'animism-align/frontend/app/router.js')
| -rw-r--r-- | animism-align/frontend/app/router.js | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/animism-align/frontend/app/router.js b/animism-align/frontend/app/router.js index 982429b..e4ea05e 100644 --- a/animism-align/frontend/app/router.js +++ b/animism-align/frontend/app/router.js @@ -2,8 +2,7 @@ import React, { Component } from 'react' import { ConnectedRouter } from 'connected-react-router' import { Route } from 'react-router' -import actions from 'app/actions' - +import AuthGate from 'app/views/auth/auth.gate' import Header from 'app/views/nav/header.component' import * as views from 'app/views' @@ -17,22 +16,21 @@ const viewList = Object.keys(views).map(name => { }) export default class Router extends Component { - componentDidMount() { - actions.site.loadProject() - } render() { return ( - <ConnectedRouter history={this.props.history}> - <div className='app'> - <Header /> - {viewList} - <Route exact key='root' path='/' render={() => { - // redirect to index!! - setTimeout(() => this.props.history.push('/align'), 10) - return null - }} /> - </div> - </ConnectedRouter> + <AuthGate> + <ConnectedRouter history={this.props.history}> + <div className='app'> + <Header /> + {viewList} + <Route exact key='root' path='/' render={() => { + // redirect to index!! + setTimeout(() => this.props.history.push('/align'), 10) + return null + }} /> + </div> + </ConnectedRouter> + </AuthGate> ) } } |
