feat: menu wrapper 생성

This commit is contained in:
2025-03-31 18:03:48 +09:00
parent 8117ca5c2c
commit ea319aa5ab
20 changed files with 107 additions and 26 deletions
+5 -8
View File
@@ -1,13 +1,7 @@
import { PageTitle } from "@common/components";
import { useMenuStore } from "../lib/use-menu-store";
function PageLayout({
children,
pageTitle,
}: {
children: React.ReactNode;
pageTitle: string;
}) {
function PageLayout({ children }: { children: React.ReactNode }) {
const { currentMenuInfo } = useMenuStore((state) => state);
const menuPaths = currentMenuInfo?.menuPath
@@ -16,7 +10,10 @@ function PageLayout({
return (
<div className="h-auto min-h-full bg-container">
<PageTitle title={pageTitle} menuPaths={menuPaths ?? []} />
<PageTitle
title={currentMenuInfo?.menuKornNm ?? ""}
menuPaths={menuPaths ?? []}
/>
{children}
</div>
);