forked from sombochea/verdaccio-ui
chore: sync with verdaccio master
This commit is contained in:
26
src/webui/index.js
Normal file
26
src/webui/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import './utils/__setPublicPath__';
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import {AppContainer} from 'react-hot-loader';
|
||||
|
||||
import App from './app';
|
||||
|
||||
const rootNode = document.getElementById('root');
|
||||
|
||||
const renderApp = (Component) => {
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<Component />
|
||||
</AppContainer>,
|
||||
rootNode
|
||||
);
|
||||
};
|
||||
|
||||
renderApp(App);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./app', () => {
|
||||
renderApp(App);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user