mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 04:09:12 +00:00
chore: remove react-redux-router
This commit is contained in:
parent
77f81dc8b6
commit
86c31126e8
6 changed files with 6 additions and 16 deletions
10
UI/package-lock.json
generated
10
UI/package-lock.json
generated
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { combineReducers } from 'redux'
|
||||
|
||||
import servers from './servers'
|
||||
import user from './user'
|
||||
import rolePicker from './role-picker'
|
||||
|
|
3
UI/src/router/history.js
Normal file
3
UI/src/router/history.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import createHistory from 'history/createBrowserHistory'
|
||||
|
||||
export const history = createHistory()
|
Loading…
Add table
Reference in a new issue