Newer
Older
import { fetchSelectedMneThunk } from '@component/devices/routines/mne.routine'
import { RoutineHolderSingleton } from '@utils/routine-holder.singleton'
import i18next from 'i18next'
import { ErrorBoundary } from "react-error-boundary"
import { I18nextProvider } from 'react-i18next'
import { Provider } from 'react-redux'
RouterProvider
import { ToastContainer } from 'react-toastify'
import { PersistGate } from 'redux-persist/integration/react'
import './i18n/config'
import { router } from './routes'
import { persistor, store } from './stores'
window.env = window.location.hostname === 'localhost' ? 'development' : 'production';
const factory = RoutineHolderSingleton.getInstance();
factory.registerRoutine("fetchSelectedMneThunk", {
func: fetchSelectedMneThunk,
id: 0
});
ReactDOM.createRoot(document.getElementById("root")).render(
<ErrorBoundary fallback={<div>Something went wrong</div>}>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<I18nextProvider i18n={i18next}>
<UtilsProvider>
</UtilsProvider>
</I18nextProvider>
</PersistGate>
</Provider>
</ErrorBoundary>