import { useAtom } from "jotai";
import { Layout } from "../components/Generic/Layout";
import { LoadingScreen } from "../components/Generic/LoadingScreen";
import { loadingAtom } from "../lib/store/jotai/loading";

export default function Home() {
  const [loading] = useAtom(loadingAtom);

  if (loading) {
    return <LoadingScreen loadingText="Loading..." />;
  } else {
    return <Layout />;
  }
}
