import App, {AppProps} from 'next/app';
import {ThemeProvider} from "next-themes";
import {SessionProvider} from "next-auth/react";

import './styles.css';

function CustomApp({Component, pageProps}: AppProps) {
  pageProps = {...pageProps};
  return (
    <>
      <SessionProvider session={pageProps.session}>
        <ThemeProvider enableSystem={true}
                       attribute="class">
          <Component {...pageProps} />
        </ThemeProvider>
      </SessionProvider>
    </>
  );
}

export default CustomApp;
