From 940b3208f136240e690dd509b00c71b7267f7d41 Mon Sep 17 00:00:00 2001 From: yschoi Date: Sun, 10 Aug 2025 15:52:56 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=B5=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/app/pages/(map-layout)/layout.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/fo/app/pages/(map-layout)/layout.tsx b/apps/fo/app/pages/(map-layout)/layout.tsx index a9a7a8e93..69a60b7a2 100644 --- a/apps/fo/app/pages/(map-layout)/layout.tsx +++ b/apps/fo/app/pages/(map-layout)/layout.tsx @@ -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 ( - {children} + {children} ); }