import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import reportWebVitals from './reportWebVitals';
import { AuthRoute, StrictModeSwitch } from './components';
import { store } from './store';

import {
  /* PAGE_IMPORTS */
  AppWithHoc,
} from './pages';

createRoot(document.getElementById('root') as HTMLElement).render(
  <StrictModeSwitch active={false}>
    <Provider store={store}>
      <BrowserRouter>
        <Routes>
          <Route index element={<AppWithHoc />} />

          <Route element={<AuthRoute redirectUrl='/' />}>

          </Route>
        </Routes>
      </BrowserRouter>
	  </Provider>
  </StrictModeSwitch>
);

// 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();
