
import React from 'react';
import ReactDOM from 'react-dom';
import store from './stores'
import { history } from '@wisdom-utils/runtime';
import { Provider } from 'react-redux';
import { ConfigProvider } from 'antd';
import { ConnectedRouter } from 'connected-react-router/immutable';
import ErrorBoundary from './components/ErrorBoundary';
import Container from './components/Container';
import { LocaleContainer } from './locales/locale';
import App from './containers/App';
const MOUNT_NODE = document.getElementById('root');
export const render = () => {
    // eslint-disable-next-line react-hooks/rules-of-hooks
    ReactDOM.render(
      <Provider store={store}>
        <ConnectedRouter history={history}>
          <LocaleContainer>
            <ConfigProvider prefixCls="panda-console-base">
              <ErrorBoundary>
                <Container>
                  <App />
                </Container>
              </ErrorBoundary>
            </ConfigProvider>
          </LocaleContainer>
        </ConnectedRouter>
      </Provider>,
      MOUNT_NODE,
    );
  };
  // updateTheme('#ff9600');
  const loader = (appContent, loading) => render({ appContent, loading });

  export default loader;