middleware 작업진행중

This commit is contained in:
YangJinSoo94
2025-07-22 16:01:48 +09:00
parent 1ec1c42e9f
commit 425eb39a86
3 changed files with 28 additions and 9 deletions
+22
View File
@@ -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 <BaseLayout handleMenuClick={handleClick}>{children}</BaseLayout>;
}
+4 -7
View File
@@ -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({
<html lang="en">
<body>
<StoreProvider>
<BaseLayout>
{children}
</BaseLayout>
<Base>{children}</Base>
</StoreProvider>
</body>
</html>
);
}
}
+2 -2
View File
@@ -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;