wing-ops/frontend/src/common/components/layout/MainLayout.tsx
htlee a61864646f refactor(frontend): 공통 모듈 common/ 분리 + OpenLayers 제거 + path alias 설정
- OpenLayers(ol) 패키지 제거 (미사용, import 0건)
- common/ 디렉토리 생성: components, hooks, services, store, types, utils
- 17개 공통 파일을 common/으로 이동 (git mv, blame 이력 보존)
- MainTab 타입을 App.tsx에서 common/types/navigation.ts로 분리
- tsconfig path alias (@common/*, @tabs/*) + vite resolve.alias 설정
- 42개 import 경로를 @common/ alias 또는 상대경로로 수정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 14:00:50 +09:00

28 lines
825 B
TypeScript
Executable File

import type { ReactNode } from 'react'
import type { MainTab } from '../../types/navigation'
import { TopBar } from './TopBar'
import { SubMenuBar } from './SubMenuBar'
interface MainLayoutProps {
children: ReactNode
activeMainTab: MainTab
onMainTabChange: (tab: MainTab) => void
}
export function MainLayout({ children, activeMainTab, onMainTabChange }: MainLayoutProps) {
return (
<div className="h-screen w-screen flex flex-col bg-bg-0 text-text-1 overflow-hidden">
{/* Top Navigation - Level 1 */}
<TopBar activeTab={activeMainTab} onTabChange={onMainTabChange} />
{/* Sub Menu Navigation - Level 2 */}
<SubMenuBar activeMainTab={activeMainTab} />
{/* Main Content Area */}
<div className="flex flex-1 overflow-hidden">
{children}
</div>
</div>
)
}