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
+1
View File
@@ -14,6 +14,7 @@ export const ENDPOINT = {
IPS: "/cms-service/api/v1/site-ips",
DOMAINS: "/cms-service/api/v1/site-dmns",
MENUS: "/cms-service/api/v1/menus",
MENU_ROLES: "/cms-service/api/v1/menu-roles",
CONTENTS: "/cms-service/api/v1/contents",
USER_OGNZ: "/cms-service/api/v1/user-ognz",
},
+1
View File
@@ -1,2 +1,3 @@
export { getCookie, setCookie, removeCookie } from "./cookie";
export { useMenuStore } from "./use-menu-store";
export { useUserStore } from "./use-user-store";
+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>
);