File tree Expand file tree Collapse file tree 3 files changed +15
-18
lines changed Expand file tree Collapse file tree 3 files changed +15
-18
lines changed Original file line number Diff line number Diff line change 1
1
import React , { Component , PropTypes } from 'react'
2
2
import { Provider } from 'react-redux'
3
- import Routes from '../routes'
3
+ import routes from '../routes'
4
4
import DevTools from './DevTools'
5
+ import { Router , browserHistory } from 'react-router'
5
6
6
7
export default class Root extends Component {
7
8
render ( ) {
8
9
const { store } = this . props
9
10
return (
10
11
< Provider store = { store } >
11
12
< div >
12
- < Routes />
13
+ < Router history = { browserHistory } routes = { routes } />
13
14
< DevTools />
14
15
</ div >
15
16
</ Provider >
Original file line number Diff line number Diff line change 1
1
import React , { Component , PropTypes } from 'react'
2
2
import { Provider } from 'react-redux'
3
-
4
- import Routes from '../routes '
3
+ import routes from '../routes'
4
+ import { Router , browserHistory } from 'react-router '
5
5
6
6
export default class Root extends Component {
7
7
render ( ) {
8
8
const { store } = this . props
9
9
return (
10
10
< Provider store = { store } >
11
- < Routes />
11
+ < Router history = { browserHistory } routes = { routes } />
12
12
</ Provider >
13
13
)
14
14
}
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import { Route , browserHistory , Router } from 'react-router'
2
+ import { Route } from 'react-router'
3
3
import App from './containers/App'
4
4
import UserPage from './containers/UserPage'
5
5
import RepoPage from './containers/RepoPage'
6
6
7
- export default function Routes ( ) {
8
- return (
9
- < Router history = { browserHistory } >
10
- < Route path = "/" component = { App } >
11
- < Route path = "/:login/:name"
12
- component = { RepoPage } />
13
- < Route path = "/:login"
14
- component = { UserPage } />
15
- </ Route >
16
- </ Router >
17
- )
18
- }
7
+ export default (
8
+ < Route path = "/" component = { App } >
9
+ < Route path = "/:login/:name"
10
+ component = { RepoPage } />
11
+ < Route path = "/:login"
12
+ component = { UserPage } />
13
+ </ Route >
14
+ )
You can’t perform that action at this time.
0 commit comments