mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-24 19:59:12 +00:00
update everything. use npm instead of yarn.
This commit is contained in:
parent
36af7ac8f2
commit
77f81dc8b6
7 changed files with 13 additions and 16 deletions
|
@ -1,13 +1,12 @@
|
|||
import React, { Component } from 'react'
|
||||
import { Provider } from 'react-redux'
|
||||
import { ConnectedRouter } from 'react-router-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'
|
||||
|
||||
import { Router } from 'react-router-dom'
|
||||
import Wrapper from './components/wrapper'
|
||||
import AppRouter from './router'
|
||||
import { userInit } from './actions'
|
||||
|
@ -18,18 +17,18 @@ const store = configureStore(undefined, history)
|
|||
window.__APP_STORE__ = store
|
||||
|
||||
class _App extends Component {
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
store.dispatch(userInit)
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
<Router history={history}>
|
||||
<Wrapper>
|
||||
<AppRouter />
|
||||
</Wrapper>
|
||||
</ConnectedRouter>
|
||||
</Router>
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ const dropTarget = DropTarget(
|
|||
})
|
||||
)
|
||||
class RoleEditor extends Component {
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
const {
|
||||
dispatch,
|
||||
match: {
|
||||
|
@ -231,4 +231,4 @@ class RoleEditor extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default dropTarget(connect(mapState)(RoleEditor))
|
||||
export default connect(mapState)(dropTarget(RoleEditor))
|
||||
|
|
|
@ -15,7 +15,7 @@ const mapState = ({ rolePicker, servers }, ownProps) => {
|
|||
}
|
||||
|
||||
class RolePicker extends Component {
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
const {
|
||||
dispatch,
|
||||
match: {
|
||||
|
|
|
@ -9,7 +9,7 @@ export default class ServerLanding extends Component {
|
|||
exit: false,
|
||||
}
|
||||
|
||||
async componentWillMount() {
|
||||
async componentDidMount() {
|
||||
console.log(this.props)
|
||||
|
||||
try {
|
||||
|
|
|
@ -4,7 +4,6 @@ import servers from './servers'
|
|||
import user from './user'
|
||||
import rolePicker from './role-picker'
|
||||
import roleEditor from './role-editor'
|
||||
import { routerMiddleware } from 'react-router-redux'
|
||||
// import roles from './roles'
|
||||
|
||||
const initialState = {
|
||||
|
@ -36,7 +35,6 @@ const rootReducer = combineReducers({
|
|||
appState,
|
||||
servers,
|
||||
user,
|
||||
router: routerMiddleware,
|
||||
// roles,
|
||||
rolePicker,
|
||||
roleEditor,
|
||||
|
|
|
@ -21,7 +21,7 @@ class _AppRouter extends Component {
|
|||
<Switch>
|
||||
{isLoggedIn === true ? (
|
||||
// YES LOGGED IN
|
||||
<Route path="/s" component={Servers} />
|
||||
<Route path="/s" component={() => <Servers />} />
|
||||
) : (
|
||||
// NOT LOGGED IN
|
||||
[
|
||||
|
|
8
start.sh
8
start.sh
|
@ -3,12 +3,12 @@
|
|||
docker-compose up -d
|
||||
|
||||
pushd Server
|
||||
npm ci
|
||||
yarn dev
|
||||
npm i
|
||||
npm run dev
|
||||
|
||||
popd
|
||||
|
||||
pushd UI
|
||||
npm ci
|
||||
yarn start
|
||||
npm i
|
||||
npm start
|
||||
popd
|
Loading…
Add table
Reference in a new issue