argh simplify

This commit is contained in:
Jori Lallo
2016-03-10 23:18:36 -08:00
parent 5c2b1ef117
commit 1133720fd4
4 changed files with 22 additions and 24 deletions

View File

@@ -10,6 +10,7 @@ import {
} from '../../Actions';
import Header from '../../Components/Header';
import Dashboard from '../Dashboard';
import Auth from '../../Utils/Auth';
@@ -51,7 +52,7 @@ class App extends Component {
unsavedChanges={this.props.unsavedChanges}
/>
<div className={ styles.content }>
{ this.props.children }
<Dashboard />
</div>
</div>
);

View File

@@ -43,10 +43,7 @@ function requireAuth(nextState, replace) {
render((
<Provider store={store}>
<Router history={History}>
<Route path="/" component={Dashboard}>
<Route path="login" component={Login} />
<Route path="dashboard" component={Dashboard} onEnter={requireAuth} />
</Route>
<Route path="/" component={App} />
</Router>
</Provider>
), document.getElementById('root'));