맵 레이아웃 수정

This commit is contained in:
yschoi
2025-08-10 15:52:56 +09:00
parent e91b5a5ddb
commit 940b3208f1
+13 -1
View File
@@ -1,12 +1,24 @@
'use client'
import { NoFooterLayout } from "@common/components";
import type { MenuItem } from "../../store/common";
import { useFoStore } from "../../store";
import { usePathname, useRouter } from "next/navigation";
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const { getMenuAuth } = useFoStore((state) => state);
const pathname = usePathname();
const router = useRouter();
const handleClick = (id: MenuItem) => {
getMenuAuth(id.menuCd);
router.push(id.urlPath);
};
return (
<NoFooterLayout>{children}</NoFooterLayout>
<NoFooterLayout currentPath={pathname ?? ""} handleMenuClick={handleClick}>{children}</NoFooterLayout>
);
}