chore: upload parte 1 - logica
DevSecOps Enterprise Pipeline / security-gate-and-deploy (push) Failing after 41s
DevSecOps Enterprise Pipeline / security-gate-and-deploy (push) Failing after 41s
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"use client";
|
||||
|
||||
import React from "react"
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
import { AppSidebar } from "@/components/app-sidebar";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
|
||||
const PUBLIC_PATHS = ["/login"];
|
||||
|
||||
export function AppShell({ children }: { children: React.ReactNode }) {
|
||||
const pathname = usePathname();
|
||||
const isPublicPath = PUBLIC_PATHS.includes(pathname);
|
||||
|
||||
// Don't show sidebar on public paths like login
|
||||
if (isPublicPath) {
|
||||
return (
|
||||
<>
|
||||
{children}
|
||||
<Toaster position="top-right" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex h-screen overflow-hidden bg-background">
|
||||
<AppSidebar />
|
||||
<main className="flex-1 overflow-auto">
|
||||
{children}
|
||||
</main>
|
||||
<Toaster position="top-right" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user