Skip to content
Snippets Groups Projects
index.tsx 1.61 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { fetchSelectedMneThunk } from '@component/devices/routines/mne.routine'
    
    matthiasf's avatar
    matthiasf committed
    import { UtilsProvider } from '@provider/utils.provider'
    
    import { RoutineHolderSingleton } from '@utils/routine-holder.singleton'
    
    import i18next from 'i18next'
    
    Matthias Feyll's avatar
    Matthias Feyll committed
    import React from 'react'
    
    Matthias Feyll's avatar
    Matthias Feyll committed
    import ReactDOM from 'react-dom/client'
    
    Matthias Feyll's avatar
    Matthias Feyll committed
    import { ErrorBoundary } from "react-error-boundary"
    
    import { I18nextProvider } from 'react-i18next'
    import { Provider } from 'react-redux'
    
    Matthias Feyll's avatar
    Matthias Feyll committed
    import {
    
    Matthias Feyll's avatar
    Matthias Feyll committed
    } from 'react-router-dom'
    
    import { ToastContainer } from 'react-toastify'
    import { PersistGate } from 'redux-persist/integration/react'
    
    import './index.scss'
    
    import { router } from './routes'
    
    Matthias Feyll's avatar
    Matthias Feyll committed
    import './shared/icons/icons'
    
    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(
    
    Matthias Feyll's avatar
    Matthias Feyll committed
        <React.StrictMode>
    
    Matthias Feyll's avatar
    Matthias Feyll committed
            <ErrorBoundary fallback={<div>Something went wrong</div>}>
                <Provider store={store}>
                    <PersistGate loading={null} persistor={persistor}>
                        <I18nextProvider i18n={i18next}>
                            <UtilsProvider>
    
    matthiasf's avatar
    matthiasf committed
                                <ToastContainer />
    
    matthiasf's avatar
    matthiasf committed
                                <RouterProvider router={router} />
    
    Matthias Feyll's avatar
    Matthias Feyll committed
                            </UtilsProvider>
                        </I18nextProvider>
                    </PersistGate>
                </Provider>
            </ErrorBoundary>
    
    Matthias Feyll's avatar
    Matthias Feyll committed
        </React.StrictMode>