Files
frontend/apps/dc/app/(with-base-layout)/layout.tsx
T
2025-10-17 11:52:42 +09:00

26 lines
528 B
TypeScript

"use client";
import { usePathname, useRouter } from "next/navigation";
import { BaseLayout } from "@common/components/ui";
export default function WithBaseLayout({
children,
}: {
children: React.ReactNode;
}) {
const router = useRouter();
const pathname = usePathname();
const handleMenuClick = (item: any) => {
if (item.urlPath) {
router.push(item.urlPath);
}
};
return (
<BaseLayout currentPath={pathname ?? ""} handleMenuClick={handleMenuClick}>
{children}
</BaseLayout>
);
}