mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-23 13:59:28 +08:00
页面刷新 路由跳转定位
This commit is contained in:
parent
68dd0b4c96
commit
9a9d02ad7f
@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'
|
||||
import App from './App'
|
||||
import { createStore, combineReducers } from 'redux'
|
||||
import { Provider, connect } from 'react-redux'
|
||||
import ReduxContainer from './redux.js'
|
||||
import ReduxContainer from './ReduxContainer.js'
|
||||
|
||||
// 合并 redux 创建stroe
|
||||
const store = createStore(combineReducers( ReduxContainer ))
|
||||
|
@ -1,15 +1,15 @@
|
||||
import React from 'react'
|
||||
import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
|
||||
import { BrowserRouter as Router, Route, Link, HashRouter } from 'react-router-dom'
|
||||
import { Home, Login, ProjectGroups } from './containers/index'
|
||||
|
||||
export default store => {
|
||||
return (
|
||||
<Router>
|
||||
<HashRouter>
|
||||
<div className="router-main">
|
||||
<Route path="/" component={ Home } />
|
||||
<Route path="/Login" component={ Login } />
|
||||
<Route path="/ProjectGroups" component={ ProjectGroups } />
|
||||
</div>
|
||||
</Router>
|
||||
</HashRouter>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user