27 lines
636 B
TypeScript
27 lines
636 B
TypeScript
"use client"
|
|
import { BaseLayout } from "@common/components/ui";
|
|
import { useWrStore } from "./store";
|
|
import { MainDiv } from "@common/business_components/ui";
|
|
import type { MenuItem } from "./store/common/type/menu";
|
|
|
|
export default function Base({
|
|
children,
|
|
changeMenu,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
changeMenu: (path: string) => void;
|
|
}>) {
|
|
const { getMenuAuthrts } = useWrStore((state) => state);
|
|
|
|
return (
|
|
<BaseLayout
|
|
handleMenuClick={(e: MenuItem) => {
|
|
getMenuAutpnhrts(e.menuCd);
|
|
changeMenu(e.urlPath);
|
|
}}
|
|
>
|
|
<MainDiv>{children}</MainDiv>
|
|
</BaseLayout>
|
|
);
|
|
}
|