import React, { useEffect, useState } from "react";
import { ThemeProvider } from "next-themes";

import "../styles/main.sass";
import LoadingScreen from "components/LoadingScreen";

function Void({ Component, pageProps }) {
  const [loading, setLoading] = useState(true)

  useEffect(() => setLoading(false), [])

  if (loading) return <LoadingScreen isLoading={loading} />

  return (
    <ThemeProvider enableSystem enableColorScheme >
      {/* <LoadingScreen isLoading={loading} /> */}
      <Component {...pageProps} />
    </ThemeProvider>

  );
}

export default Void;
