File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 55
55
"babel-polyfill" : " ^6.3.14" ,
56
56
"babel-runtime" : " ^6.3.19" ,
57
57
"express" : " ^4.12.3" ,
58
- "history" : " ^1.17.0" ,
59
58
"react" : " ^0.14.6" ,
60
59
"react-dom" : " ^0.14.6" ,
61
- "react-router" : " ^1 .0.3 "
60
+ "react-router" : " ^2 .0.0 "
62
61
}
63
62
}
Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ import "babel-polyfill";
8
8
// Libraries
9
9
import React from "react" ;
10
10
import ReactDOM from "react-dom" ;
11
- import { Router } from "react-router" ;
12
- import createBrowserHistory from 'history/lib/createBrowserHistory'
11
+ import { Router , browserHistory } from "react-router" ;
13
12
14
13
// Routes
15
14
import Routes from './common/components/Routes' ;
@@ -25,7 +24,7 @@ const DOM_APP_EL_ID = "app";
25
24
26
25
// Render the router
27
26
ReactDOM . render ( (
28
- < Router history = { createBrowserHistory ( ) } >
27
+ < Router history = { browserHistory } >
29
28
{ Routes }
30
29
</ Router >
31
30
) , document . getElementById ( DOM_APP_EL_ID ) ) ;
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
+ import { browserHistory } from "react-router" ;
2
3
import styles from "./style.css" ;
3
4
4
5
5
6
export default class LoginPage extends React . Component {
7
+
8
+ signUp ( ) {
9
+ browserHistory . push ( "/home" ) ;
10
+ }
11
+
6
12
render ( ) {
7
13
return (
8
14
< div className = { styles . content } >
You can’t perform that action at this time.
0 commit comments