/* eslint-disable react/jsx-filename-extension */
import React from 'react';
import { createRoot } from 'react-dom/client';
import navigationService from '@common/navigation/NavigationService';
import App from './App';
import('./store');

const container = document.getElementById('root');
const root = createRoot(container);
root.render(<App />);

//@ts-ignore
if (module?.hot) {
  //@ts-ignore
  module.hot.accept(function (err) {
    console.log('An error occurred while accepting new version: ', err);
  });
}

window.onpopstate = () => {
  navigationService.goBack();
};
