21 lines
536 B
TypeScript
21 lines
536 B
TypeScript
"use client";
|
|
|
|
import { ReactNode } from "react";
|
|
import { usePathname } from "next/navigation";
|
|
import Sidebar from "./Sidebar";
|
|
|
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
const pathname = usePathname();
|
|
|
|
if (pathname.startsWith("/h5")) {
|
|
return <div className="min-h-screen bg-[#eef3f1]">{children}</div>;
|
|
}
|
|
|
|
return (
|
|
<div className="min-h-screen bg-[#f5f7fa]">
|
|
<Sidebar />
|
|
<main className="min-h-screen px-4 py-5 md:ml-64 md:px-8 md:py-7">{children}</main>
|
|
</div>
|
|
);
|
|
}
|