diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx
index 04c5474..3f9bda4 100644
--- a/src/app/(main)/layout.tsx
+++ b/src/app/(main)/layout.tsx
@@ -3,43 +3,51 @@
import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { useAuthStore } from "@/store/auth-store";
+import { useMenuStore } from "@/store/menu-store";
import { Sidebar } from "@/components/layout/sidebar";
import { Header } from "@/components/layout/header";
import { Loading } from "@/components/ui/loading";
-// mainFS.jsp 대응 - 프레임셋 → Sidebar + Header + Content 레이아웃
export default function MainLayout({ children }: { children: React.ReactNode }) {
const router = useRouter();
const { user, isLoading, fetchUser } = useAuthStore();
+ const { mobileOpen, setMobileOpen } = useMenuStore();
+
+ useEffect(() => { fetchUser(); }, [fetchUser]);
useEffect(() => {
- fetchUser();
- }, [fetchUser]);
-
- useEffect(() => {
- if (!isLoading && !user) {
- router.push("/login");
- }
+ if (!isLoading && !user) router.push("/login");
}, [isLoading, user, router]);
- if (isLoading) {
- return ;
- }
-
+ if (isLoading) return ;
if (!user) return null;
return (
- {/* 사이드바 (menu.jsp 대응) */}
-
+ {/* 사이드바 — 데스크탑은 정상, 모바일은 오버레이로 등장 */}
+
+
+
+
+ {/* 모바일 오버레이 배경 — 사이드바 펼쳤을 때 어둡게 */}
+ {mobileOpen && (
+