Merge pull request #1433 from influxdata/bugfix/router-fix
Fall back to useRouterHistory method.pull/10616/head
commit
1febb80aff
|
@ -1,3 +1,8 @@
|
||||||
|
## v1.3.0~rc2 [unreleased]
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
1. [#1433](https://github.com/influxdata/chronograf/pull/1433): Fix router bug introduced by upgrading to react-router v3.0.
|
||||||
|
|
||||||
## v1.3.0~rc1 [2017-05-08]
|
## v1.3.0~rc1 [2017-05-08]
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {render} from 'react-dom'
|
import {render} from 'react-dom'
|
||||||
import {Provider} from 'react-redux'
|
import {Provider} from 'react-redux'
|
||||||
import {Router, Route} from 'react-router'
|
import {Router, Route, useRouterHistory} from 'react-router'
|
||||||
import {createHistory, useBasename} from 'history'
|
import {createHistory} from 'history'
|
||||||
import {syncHistoryWithStore} from 'react-router-redux'
|
import {syncHistoryWithStore} from 'react-router-redux'
|
||||||
|
|
||||||
import App from 'src/App'
|
import App from 'src/App'
|
||||||
|
@ -44,8 +44,8 @@ const rootNode = document.getElementById('react-root')
|
||||||
|
|
||||||
const basepath = rootNode.dataset.basepath || ''
|
const basepath = rootNode.dataset.basepath || ''
|
||||||
window.basepath = basepath
|
window.basepath = basepath
|
||||||
const browserHistory = useBasename(createHistory)({
|
const browserHistory = useRouterHistory(createHistory)({
|
||||||
basename: basepath, // basepath is written in when available by the URL prefixer middleware
|
basename: basepath, // this is written in when available by the URL prefixer middleware
|
||||||
})
|
})
|
||||||
|
|
||||||
const store = configureStore(loadLocalStorage(), browserHistory)
|
const store = configureStore(loadLocalStorage(), browserHistory)
|
||||||
|
|
Loading…
Reference in New Issue