1459
This commit is contained in:
1 parent
14f473f89b
commit
b1c6878fba
21 files changed
+921
-72
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user