diff --git a/apps/dm/app/base.tsx b/apps/dm/app/base.tsx new file mode 100644 index 000000000..3905c9952 --- /dev/null +++ b/apps/dm/app/base.tsx @@ -0,0 +1,22 @@ +"use client"; + +import { BaseLayout } from "@common/components"; +import type { MenuItem } from "./store/common"; +import { useDmStore } from "./store"; +import { useRouter } from "next/navigation"; + +export default function Base({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + const { getMenuAuth } = useDmStore((state) => state); + + const router = useRouter(); + const handleClick = (id:MenuItem) =>{ + getMenuAuth(id.menuCd); + router.push(id.urlPath); + } + + return {children}; +} diff --git a/apps/dm/app/layout.tsx b/apps/dm/app/layout.tsx index 0aac0da38..7c0f47a30 100644 --- a/apps/dm/app/layout.tsx +++ b/apps/dm/app/layout.tsx @@ -1,6 +1,5 @@ -"use client"; - -import { BaseLayout } from "@common/components"; +"use client" +import Base from "./base"; import "./globals.css"; import { StoreProvider } from "./store"; @@ -13,11 +12,9 @@ export default function RootLayout({ - - {children} - + {children} ); -} +} \ No newline at end of file diff --git a/apps/dm/components/ui/config/index.ts b/apps/dm/components/ui/config/index.ts index f54a9ff61..eb2379c7a 100644 --- a/apps/dm/components/ui/config/index.ts +++ b/apps/dm/components/ui/config/index.ts @@ -1,5 +1,5 @@ -import { PROXY_HOST, SERVER_API_URL, SERVER_API_WR_URL } from "@/src/shared/config/env"; +import { PROXY_HOST, SERVER_API_FO_URL, SERVER_API_URL, SERVER_API_WR_URL } from "@/src/shared/config/env"; export const LOCAL_URL = PROXY_HOST; -export const DEV_URL_FO = SERVER_API_URL; +export const DEV_URL_FO = SERVER_API_FO_URL; export const DEV_URL_WR = SERVER_API_WR_URL;