Skip to content

Commit

Permalink
#89: Add React Router v2
Browse files Browse the repository at this point in the history
  • Loading branch information
cycleseven committed Oct 14, 2016
1 parent 3d64370 commit b26d820
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"react": "^15.3.1",
"react-dom": "^15.3.1",
"react-redux": "^4.4.5",
"react-router": "^2.8.1",
"redux": "^3.6.0"
},
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion src/app/components/index.js

This file was deleted.

7 changes: 6 additions & 1 deletion src/app/containers/Root.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import React from 'react';
import {Provider} from 'react-redux';
import {browserHistory, Route, Router} from 'react-router';

import {LoginScreen} from '../../authentication/containers';
import {DashboardScreen} from '../../dashboard/components';
import {createStore} from '../../store';

export default function Root() {
return <Provider store={createStore()}>
<LoginScreen></LoginScreen>
<Router history={browserHistory}>
<Route path='/' component={LoginScreen} />
<Route path='/dashboard' component={DashboardScreen} />
</Router>
</Provider>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import logo from './logo.svg';
import styles from './styles.css';

export default function Root() {
export default function DashboardScreen() {
return (
<div className={styles.root}>
<div className={styles.header}>
Expand Down
File renamed without changes
File renamed without changes.
1 change: 1 addition & 0 deletions src/dashboard/components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {default as DashboardScreen} from './DashboardScreen';

0 comments on commit b26d820

Please sign in to comment.