This commit is contained in:
Vaica committed 2026-06-22 14:59:24 +08:00
1 parent 14f473f89b
commit b1c6878fba
21 files changed
+921 -72

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
"use client";
import { usePathname } from "next/navigation";
import Sidebar from "@/components/Sidebar";
import AuthGuard from "@/components/AuthGuard";
export default function AppShell({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
const isLoginPage = pathname === "/login";
if (isLoginPage) {
return <AuthGuard>{children}</AuthGuard>;
}
return (
<AuthGuard>
<Sidebar />
<main className="flex-1 overflow-auto pt-12 md:pt-0 h-full">
{children}
</main>
</AuthGuard>
);
}