Added React Hot Reload to dapps + TokenDeplpoy fix (#4846)
This commit is contained in:
parent
bd00256e0c
commit
3478c16e10
@ -16,6 +16,7 @@
|
||||
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
|
||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
injectTapEventPlugin();
|
||||
@ -27,6 +28,21 @@ import '../../assets/fonts/RobotoMono/font.css';
|
||||
import './style.css';
|
||||
|
||||
ReactDOM.render(
|
||||
<Application />,
|
||||
<AppContainer>
|
||||
<Application />
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./githubhint/Application/index.js', () => {
|
||||
require('./githubhint/Application/index.js');
|
||||
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<Application />
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
|
||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
injectTapEventPlugin();
|
||||
@ -27,6 +28,21 @@ import '../../assets/fonts/RobotoMono/font.css';
|
||||
import './style.css';
|
||||
|
||||
ReactDOM.render(
|
||||
<Application />,
|
||||
<AppContainer>
|
||||
<Application />
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./localtx/Application/index.js', () => {
|
||||
require('./localtx/Application/index.js');
|
||||
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<Application />
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
|
||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
injectTapEventPlugin();
|
||||
@ -27,6 +28,21 @@ import '../../assets/fonts/RobotoMono/font.css';
|
||||
import './style.css';
|
||||
|
||||
ReactDOM.render(
|
||||
<Application />,
|
||||
<AppContainer>
|
||||
<Application />
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./signaturereg/Application/index.js', () => {
|
||||
require('./signaturereg/Application/index.js');
|
||||
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<Application />
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
import { Redirect, Router, Route, hashHistory } from 'react-router';
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
|
||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
injectTapEventPlugin();
|
||||
@ -31,6 +32,7 @@ import '../../assets/fonts/RobotoMono/font.css';
|
||||
import './style.css';
|
||||
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<Router history={ hashHistory }>
|
||||
<Redirect from='/' to='/overview' />
|
||||
<Route path='/' component={ Application }>
|
||||
@ -38,6 +40,29 @@ ReactDOM.render(
|
||||
<Route path='overview' component={ Overview } />
|
||||
<Route path='transfer' component={ Transfer } />
|
||||
</Route>
|
||||
</Router>,
|
||||
</Router>
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./tokendeploy/Application/index.js', () => {
|
||||
require('./tokendeploy/Application/index.js');
|
||||
require('./tokendeploy/Overview/index.js');
|
||||
require('./tokendeploy/Transfer/index.js');
|
||||
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<Router history={ hashHistory }>
|
||||
<Redirect from='/' to='/overview' />
|
||||
<Route path='/' component={ Application }>
|
||||
<Route path='deploy' component={ Deploy } />
|
||||
<Route path='overview' component={ Overview } />
|
||||
<Route path='transfer' component={ Transfer } />
|
||||
</Route>
|
||||
</Router>
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ export function attachInstances () {
|
||||
.all([
|
||||
api.parity.registryAddress(),
|
||||
api.parity.netChain(),
|
||||
api.partiy.netVersion()
|
||||
api.net.version()
|
||||
])
|
||||
.then(([registryAddress, netChain, _netVersion]) => {
|
||||
const registry = api.newContract(abis.registry, registryAddress).instance;
|
||||
|
@ -17,6 +17,7 @@
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
|
||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
injectTapEventPlugin();
|
||||
@ -29,10 +30,25 @@ import '../../assets/fonts/RobotoMono/font.css';
|
||||
import './style.css';
|
||||
|
||||
ReactDOM.render(
|
||||
(
|
||||
<AppContainer>
|
||||
<Provider store={ store }>
|
||||
<Container />
|
||||
</Provider>
|
||||
),
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./tokenreg/Container.js', () => {
|
||||
require('./tokenreg/Container.js');
|
||||
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<Provider store={ store }>
|
||||
<Container />
|
||||
</Provider>
|
||||
</AppContainer>,
|
||||
document.querySelector('#container')
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user