ship-gis/src/publish/pages/NavComponent.jsx
HeungTak Lee f4f0cb274f dark 프로젝트 구현 현재 상태 스냅샷
- Vite 마이그레이션, OpenLayers+Deck.gl 지도 연동
- STOMP WebSocket 선박 실시간 데이터 수신
- 선박 범례/필터/카운트, 다크시그널 처리
- Ctrl+Drag 박스선택, 우클릭 컨텍스트 메뉴
- 측정도구, 상세모달, 호버 툴팁
- darkSignalIds Set 패턴, INSHORE/OFFSHORE 타임아웃

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:01:54 +09:00

72 lines
3.1 KiB
JavaScript

export default function NavComponent({ activeKey, onChange }) {
const gnbList = [
{ key: 'gnb1', class: 'gnb1', label: '선박' },
{ key: 'gnb2', class: 'gnb2', label: '위성' },
{ key: 'gnb3', class: 'gnb3', label: '기상' },
{ key: 'gnb4', class: 'gnb4', label: '분석' },
{ key: 'gnb5', class: 'gnb5', label: '타임라인' },
{ key: 'gnb6', class: 'gnb6', label: 'AI모드' },
{ key: 'gnb7', class: 'gnb7', label: '리플레이' },
{ key: 'gnb8', class: 'gnb8', label: '항적조회' },
];
const sideList = [
{ key: 'filter', class: 'filter', label: '필터' },
{ key: 'layer', class: 'layer', label: '레이어' },
];
return(
<nav id="nav">
{/* <ul className="gnb">
<li><button type="button" className="gnb1 active" title="선박" aria-label="선박"></button></li>
<li><button type="button" className="gnb2" title="위성" aria-label="위성"></button></li>
<li><button type="button" className="gnb3" title="기상" aria-label="기상"></button></li>
<li><button type="button" className="gnb4" title="분석" aria-label="분석"></button></li>
<li><button type="button" className="gnb5" title="타임라인" aria-label="타임라인"></button></li>
<li><button type="button" className="gnb6" title="AI모드" aria-label="AI모드"></button></li>
<li><button type="button" className="gnb7" title="리플레이" aria-label="리플레이"></button></li>
<li><button type="button" className="gnb8" title="항적조회" aria-label="항적조회"><</button></li>
</ul>
<ul className="side">
<li><button type="button" className="filter" title="필터" aria-label="필터"></button></li>
<li><button type="button" className="layer" title="레이어" aria-label="레이어"></button></li>
</ul> */}
<ul className="gnb">
{gnbList.map(item => (
<li key={item.key}>
<button
type="button"
className={`${item.class} ${activeKey === item.key ? 'active' : ''}`}
onClick={() => onChange(item.key)}
aria-label={item.label}
title={item.label}
>
<span className="blind">{item.label}</span>
</button>
</li>
))}
</ul>
<ul className="side">
{sideList.map(item => (
<li key={item.key}>
<button
type="button"
className={`${item.class} ${activeKey === item.key ? 'active' : ''}`}
onClick={() => onChange(item.key)}
aria-label={item.label}
title={item.label}
>
<span className="blind">{item.label}</span>
</button>
</li>
))}
</ul>
</nav>
)
}