diff options
-rw-r--r-- | server/sonar-web/package.json | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/account/app.js | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/code/app.js | 6 |
3 files changed, 7 insertions, 9 deletions
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 2a51af8a57f..15abbaa30f1 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -42,7 +42,7 @@ "gulp-util": "3.0.6", "handlebars": "2.0.0", "handlebars-loader": "1.1.4", - "history": "1.17.0", + "history": "2.0.0", "imports-loader": "0.6.5", "isparta": "4.0.0", "jquery": "2.2.0", @@ -56,7 +56,7 @@ "react-addons-test-utils": "0.14.2", "react-dom": "0.14.2", "react-redux": "4.0.1", - "react-router": "1.0.3", + "react-router": "2.0.0", "react-select": "1.0.0-beta6", "redux": "3.0.5", "redux-logger": "2.2.1", diff --git a/server/sonar-web/src/main/js/apps/account/app.js b/server/sonar-web/src/main/js/apps/account/app.js index 8004bfda586..e4643b9349c 100644 --- a/server/sonar-web/src/main/js/apps/account/app.js +++ b/server/sonar-web/src/main/js/apps/account/app.js @@ -19,8 +19,8 @@ */ import React from 'react'; import { render } from 'react-dom'; -import { Router, Route, IndexRoute, Redirect } from 'react-router'; -import { createHistory, useBasename } from 'history'; +import { Router, Route, IndexRoute, Redirect, useRouterHistory } from 'react-router'; +import { createHistory } from 'history'; import { Provider } from 'react-redux'; import configureStore from './store/configureStore'; @@ -35,7 +35,7 @@ import './styles/account.css'; window.sonarqube.appStarted.then(options => { const el = document.querySelector(options.el); - const history = useBasename(createHistory)({ + const history = useRouterHistory(createHistory)({ basename: window.baseUrl + '/account' }); diff --git a/server/sonar-web/src/main/js/apps/code/app.js b/server/sonar-web/src/main/js/apps/code/app.js index 48051b0d25e..cf84835a71f 100644 --- a/server/sonar-web/src/main/js/apps/code/app.js +++ b/server/sonar-web/src/main/js/apps/code/app.js @@ -20,7 +20,7 @@ import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; -import { Router, Route } from 'react-router'; +import { Router, Route, useRouterHistory } from 'react-router'; import { createHashHistory } from 'history'; import { syncReduxAndRouter } from 'redux-simple-router'; @@ -31,9 +31,7 @@ import './styles/code.css'; const store = configureStore(); -const history = createHashHistory({ - queryKey: false -}); +const history = useRouterHistory(createHashHistory)({ queryKey: false }); syncReduxAndRouter(history, store); |