From 77f81dc8b69a670e14af5ac377f7d5dcbabb613f Mon Sep 17 00:00:00 2001 From: Katie Thornhill Date: Wed, 20 Nov 2019 00:17:07 -0500 Subject: [PATCH] update everything. use npm instead of yarn. --- UI/src/App.js | 9 ++++----- UI/src/components/role-editor/index.js | 4 ++-- UI/src/components/role-picker/index.js | 2 +- UI/src/components/servers/ServerLanding.js | 2 +- UI/src/reducers/index.js | 2 -- UI/src/router/index.js | 2 +- start.sh | 8 ++++---- 7 files changed, 13 insertions(+), 16 deletions(-) diff --git a/UI/src/App.js b/UI/src/App.js index 38b7ee2..e4322ba 100644 --- a/UI/src/App.js +++ b/UI/src/App.js @@ -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 ( - + - + ) } diff --git a/UI/src/components/role-editor/index.js b/UI/src/components/role-editor/index.js index 5e8ec5c..dc9075d 100644 --- a/UI/src/components/role-editor/index.js +++ b/UI/src/components/role-editor/index.js @@ -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)) diff --git a/UI/src/components/role-picker/index.js b/UI/src/components/role-picker/index.js index 8241ba6..fc04a06 100644 --- a/UI/src/components/role-picker/index.js +++ b/UI/src/components/role-picker/index.js @@ -15,7 +15,7 @@ const mapState = ({ rolePicker, servers }, ownProps) => { } class RolePicker extends Component { - componentWillMount() { + componentDidMount() { const { dispatch, match: { diff --git a/UI/src/components/servers/ServerLanding.js b/UI/src/components/servers/ServerLanding.js index b4d99b8..65f6eda 100644 --- a/UI/src/components/servers/ServerLanding.js +++ b/UI/src/components/servers/ServerLanding.js @@ -9,7 +9,7 @@ export default class ServerLanding extends Component { exit: false, } - async componentWillMount() { + async componentDidMount() { console.log(this.props) try { diff --git a/UI/src/reducers/index.js b/UI/src/reducers/index.js index 4a68f8a..6f48c5f 100644 --- a/UI/src/reducers/index.js +++ b/UI/src/reducers/index.js @@ -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, diff --git a/UI/src/router/index.js b/UI/src/router/index.js index 103f035..1cbff11 100644 --- a/UI/src/router/index.js +++ b/UI/src/router/index.js @@ -21,7 +21,7 @@ class _AppRouter extends Component { {isLoggedIn === true ? ( // YES LOGGED IN - + } /> ) : ( // NOT LOGGED IN [ diff --git a/start.sh b/start.sh index d2d8549..01fffbb 100755 --- a/start.sh +++ b/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 \ No newline at end of file