23 lines
582 B
TypeScript
23 lines
582 B
TypeScript
import { PageTitle } from "@common/components";
|
|
import { useMenuStore } from "../lib/use-menu-store";
|
|
|
|
function PageLayout({ children }: { children: React.ReactNode }) {
|
|
const currentMenuInfo = useMenuStore((state) => state.currentMenuInfo);
|
|
|
|
const menuPaths = currentMenuInfo?.menuPath
|
|
?.split(">")
|
|
.map((path) => path.trim());
|
|
|
|
return (
|
|
<div className="h-auto min-h-full bg-container pb-2">
|
|
<PageTitle
|
|
title={currentMenuInfo?.menuKornNm ?? ""}
|
|
menuPaths={menuPaths ?? []}
|
|
/>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export { PageLayout };
|