feat: page title 컴포넌트 생성

This commit is contained in:
2025-03-31 13:09:05 +09:00
parent 7860345e89
commit 0aee493d32
12 changed files with 120 additions and 15 deletions
+10 -3
View File
@@ -1,3 +1,6 @@
import { PageTitle } from "@common/components";
import { useMenuStore } from "../lib/use-menu-store";
function PageLayout({
children,
pageTitle,
@@ -5,11 +8,15 @@ function PageLayout({
children: React.ReactNode;
pageTitle: string;
}) {
const { currentMenuInfo } = useMenuStore((state) => state);
const menuPaths = currentMenuInfo?.menuPath
?.split(">")
.map((path) => path.trim());
return (
<div className="h-auto min-h-full bg-container">
<h2 className="px-[1.8rem] pt-[2rem] text-[2.4rem] font-semibold text-title">
{pageTitle}
</h2>
<PageTitle title={pageTitle} menuPaths={menuPaths ?? []} />
{children}
</div>
);