You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.9 KiB
JavaScript
59 lines
1.9 KiB
JavaScript
import ReactDOM from 'react-dom';
|
|
|
|
// third party
|
|
import { BrowserRouter } from 'react-router-dom';
|
|
import { Provider } from 'react-redux';
|
|
import { PersistGate } from 'redux-persist/integration/react';
|
|
import { transitions, positions, Provider as AlertProvider, types } from 'react-alert';
|
|
import AlertTemplate from 'react-alert-template-basic';
|
|
|
|
// project imports
|
|
import App from 'App';
|
|
import { BASE_PATH } from 'config';
|
|
import { store, persister } from 'store';
|
|
import * as serviceWorker from 'serviceWorker';
|
|
import reportWebVitals from 'reportWebVitals';
|
|
import { ConfigProvider } from 'contexts/ConfigContext';
|
|
|
|
// style + assets
|
|
import 'assets/scss/style.scss';
|
|
|
|
// ==============================|| REACT DOM RENDER ||============================== //
|
|
|
|
// optional configuration
|
|
const options = {
|
|
position: positions.BOTTOM_CENTER, // positions.BOTTOM_CENTER,
|
|
timeout: 2000,
|
|
type: types.INFO, // info / success / error
|
|
offset: '50px',
|
|
transition: transitions.SCALE, // 'scale' / fade
|
|
containerStyle: {
|
|
zIndex: 1000000
|
|
}
|
|
};
|
|
|
|
ReactDOM.render(
|
|
<Provider store={store}>
|
|
<PersistGate loading={null} persistor={persister}>
|
|
<ConfigProvider>
|
|
<BrowserRouter basename={BASE_PATH}>
|
|
<AlertProvider template={AlertTemplate} {...options}>
|
|
<App />
|
|
</AlertProvider>
|
|
</BrowserRouter>
|
|
</ConfigProvider>
|
|
</PersistGate>
|
|
</Provider>,
|
|
document.getElementById('root')
|
|
);
|
|
|
|
// If you want your app to work offline and load faster, you can change
|
|
// unregister() to register() below. Note this comes with some pitfalls.
|
|
// Learn more about service workers: https://bit.ly/CRA-PWA
|
|
serviceWorker.unregister();
|
|
|
|
// If you want to start measuring performance in your app, pass a function
|
|
// to log results (for example: reportWebVitals(console.log))
|
|
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
reportWebVitals();
|