Update JS dependencies (#3710)

* Minor Versions NPM updates

* Remove unused packages

* No longer relevant JS test

* Update some major versions // Revert Rechartjs

* Update Redux/React-{Ace, RouterRedux}

* Updated React Tooltips

* Update mock-socket // Update tests to pass

* Updated React Router

* Removed `history` module that isn't necessary (instead of updating it)

* Updated redux-actions

* Removed commented hot store reload
This commit is contained in:
Nicolas Gotchac
2016-12-05 11:48:43 +01:00
committed by Jaco Greeff
parent 52b4ce0dd7
commit 9a43e6d6c8
6 changed files with 121 additions and 151 deletions

View File

@@ -16,8 +16,7 @@
import ReactDOM from 'react-dom';
import React from 'react';
import { createHashHistory } from 'history';
import { Redirect, Router, Route, useRouterHistory } from 'react-router';
import { Redirect, Router, Route, hashHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
@@ -27,14 +26,12 @@ import Application from './basiccoin/Application';
import Overview from './basiccoin/Overview';
import Transfer from './basiccoin/Transfer';
const routerHistory = useRouterHistory(createHashHistory)({});
import '../../assets/fonts/Roboto/font.css';
import '../../assets/fonts/RobotoMono/font.css';
import './style.css';
ReactDOM.render(
<Router history={ routerHistory }>
<Router history={ hashHistory }>
<Redirect from='/' to='/overview' />
<Route path='/' component={ Application }>
<Route path='deploy' component={ Deploy } />

View File

@@ -25,8 +25,7 @@ import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import injectTapEventPlugin from 'react-tap-event-plugin';
import { createHashHistory } from 'history';
import { useRouterHistory } from 'react-router';
import { hashHistory } from 'react-router';
import qs from 'querystring';
import SecureApi from './secureApi';
@@ -74,13 +73,11 @@ store.dispatch(setApi(api));
window.secureApi = api;
const routerHistory = useRouterHistory(createHashHistory)({});
ReactDOM.render(
<AppContainer>
<ContextProvider api={ api } muiTheme={ muiTheme } store={ store }>
<MainApplication
routerHistory={ routerHistory }
routerHistory={ hashHistory }
/>
</ContextProvider>
</AppContainer>,
@@ -88,24 +85,6 @@ ReactDOM.render(
);
if (module.hot) {
// module.hot.accept('./redux', () => {
// // redux store has a method replaceReducer
// // const newStore = initStore(api);
// console.warn('REDUX UPDATE');
// // store.replaceReducer(appReducer);
// // ReactDOM.render(
// // <AppContainer>
// // <ContextProvider api={ api } muiTheme={ muiTheme } store={ newStore }>
// // <MainApplication
// // routerHistory={ routerHistory }
// // />
// // </ContextProvider>
// // </AppContainer>,
// // document.querySelector('#container')
// // );
// });
module.hot.accept('./main.js', () => {
require('./main.js');
@@ -113,7 +92,7 @@ if (module.hot) {
<AppContainer>
<ContextProvider api={ api } muiTheme={ muiTheme } store={ store }>
<MainApplication
routerHistory={ routerHistory }
routerHistory={ hashHistory }
/>
</ContextProvider>
</AppContainer>,