feat: add a white theme
This commit is contained in:
@@ -1,29 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useSession } from "next-auth/react";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import AppLayout from "@/components/AppLayout";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const { status } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [status, router]);
|
||||
|
||||
if (status === "loading") return null;
|
||||
if (status !== "authenticated") return null;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0d1117]">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8 bg-[#0d1117]">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
return <AppLayout>{children}</AppLayout>;
|
||||
}
|
||||
Reference in New Issue
Block a user