diff --git a/UI/package-lock.json b/UI/package-lock.json index 320ce88..e940d6e 100644 --- a/UI/package-lock.json +++ b/UI/package-lock.json @@ -11819,16 +11819,6 @@ "warning": "^4.0.1" } }, - "react-router-redux": { - "version": "5.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/react-router-redux/-/react-router-redux-5.0.0-alpha.8.tgz", - "integrity": "sha512-R/Cw62KtlMIifIjLF/xyiVOdHsooXK4uUW/ycX+jYfy1haKqmeY/N/bBiwRFNrMBat1Bn30ynDlgckwFcXLmIQ==", - "requires": { - "history": "^4.7.2", - "prop-types": "^15.6.0", - "react-router": "^4.2.0" - } - }, "react-scripts": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.2.0.tgz", diff --git a/UI/package.json b/UI/package.json index 4812530..a336eab 100644 --- a/UI/package.json +++ b/UI/package.json @@ -17,7 +17,6 @@ "react-redux": "^7.1.3", "react-router": "^4.3.1", "react-router-dom": "^4.3.1", - "react-router-redux": "^5.0.0-alpha.8", "react-scripts": "3.2.0", "react-typist": "^2.0.5", "react-typist-cycle": "^0.1.2", diff --git a/UI/src/App.js b/UI/src/App.js index e4322ba..b940335 100644 --- a/UI/src/App.js +++ b/UI/src/App.js @@ -2,7 +2,6 @@ import React, { Component } from 'react' import { Provider } from 'react-redux' import { DragDropContext } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' -import createHistory from 'history/createBrowserHistory' import configureStore from './store/configureStore' import './App.css' import './generic.sass' @@ -10,8 +9,8 @@ import { Router } from 'react-router-dom' import Wrapper from './components/wrapper' import AppRouter from './router' import { userInit } from './actions' +import { history } from './router/history' -const history = createHistory() const store = configureStore(undefined, history) window.__APP_STORE__ = store diff --git a/UI/src/actions/index.js b/UI/src/actions/index.js index b9c331e..6dff8cd 100644 --- a/UI/src/actions/index.js +++ b/UI/src/actions/index.js @@ -1,5 +1,5 @@ import superagent from 'superagent' -import { push } from 'react-router-redux' +import { history } from './router/history' export const fetchServers = async dispatch => { const rsp = await superagent.get('/api/servers') @@ -79,7 +79,7 @@ const poll = (dispatch, getState) => { const upd = newServers.keySeq().toSet() const newSrv = upd.subtract(old) stopPolling() - dispatch(push(`/s/${newSrv.toJS()[0]}/edit`)) + history.push(`/s/${newSrv.toJS()[0]}/edit`) } } diff --git a/UI/src/reducers/index.js b/UI/src/reducers/index.js index 6f48c5f..23b5e2c 100644 --- a/UI/src/reducers/index.js +++ b/UI/src/reducers/index.js @@ -1,5 +1,4 @@ import { combineReducers } from 'redux' - import servers from './servers' import user from './user' import rolePicker from './role-picker' diff --git a/UI/src/router/history.js b/UI/src/router/history.js new file mode 100644 index 0000000..6dfaaad --- /dev/null +++ b/UI/src/router/history.js @@ -0,0 +1,3 @@ +import createHistory from 'history/createBrowserHistory' + +export const history = createHistory() \ No newline at end of file