import { FC } from 'react';
import styles from './App.module.scss';
import DataContextProvider from './contexts/DataContext';
import ThemeProvider from './contexts/ThemeContext';
import Router from './routers/Router';

interface IAppProps {
  dataListener: ViewListener.ViewListener;
}

const App: FC<IAppProps> = ({ dataListener }) => {
  return (
    // <StrictMode>
    <div className={styles.app}>
      <ThemeProvider>
        <DataContextProvider dataListener={dataListener}>
          <Router globals={{ dataListener: dataListener }} />
        </DataContextProvider>
      </ThemeProvider>
    </div>
    // </StrictMode>
  );
};

export default App;
