feat: add a white theme
This commit is contained in:
@@ -1,38 +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 (
|
||||
<div className="min-h-screen bg-[#0d1117] flex items-center justify-center">
|
||||
<span className="text-[#4aff8c]/60 font-mono text-xs tracking-widest animate-pulse">
|
||||
CHARGEMENT...
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
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>;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
export default function DashboardPage() {
|
||||
return (
|
||||
<div>
|
||||
<div className="text-sm font-mono tracking-widest text-acid-green/70 uppercase mb-1">Vue générale</div>
|
||||
<h1 className="text-3xl font-black tracking-widest text-white uppercase mb-8">Tableau de bord</h1>
|
||||
<p className="text-wy-text-secondary font-mono text-sm">Données à venir...</p>
|
||||
<div className="text-sm font-mono tracking-widest uppercase mb-1" style={{ color: "var(--accent)" }}>Vue générale</div>
|
||||
<h1 className="text-3xl font-black tracking-widest uppercase mb-8" style={{ color: "var(--text-primary)" }}>Tableau de bord</h1>
|
||||
<p className="font-mono text-sm" style={{ color: "var(--text-secondary)" }}>Données à venir...</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user