snp-batch-validation/frontend/src/pages/MainMenu.tsx
HYOJIN fb1fcf5936 feat: 프론트엔드 UI 개편 - 메인 화면 및 섹션별 네비게이션 (#115)
- 메인 화면(/) 3개 섹션 카드 (Collector/Bypass/Risk&Compliance)
- 섹션별 Navbar 분리 + [← 메인] 버튼
- 플랫폼명 S&P Data Platform으로 변경
- gc-card 스타일 적용 (다크 모드 대응)
- Dashboard 경로 / → /dashboard 이동

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 11:02:27 +09:00

70 lines
2.5 KiB
TypeScript

import { Link } from 'react-router-dom';
import { useThemeContext } from '../contexts/ThemeContext';
const sections = [
{
title: 'S&P Collector',
description: 'S&P 배치 수집 관리',
detail: '대시보드, 실행 이력, 재수집 이력, 작업 관리, 스케줄, 타임라인',
path: '/dashboard',
icon: '🔄',
iconClass: 'gc-card-icon',
menuCount: 6,
},
{
title: 'S&P Bypass',
description: 'S&P Bypass API 관리',
detail: 'API 등록, 코드 생성 관리, 테스트',
path: '/bypass-config',
icon: '🔗',
iconClass: 'gc-card-icon gc-card-icon-guide',
menuCount: 1,
},
{
title: 'S&P Risk & Compliance',
description: 'S&P 위험 지표 및 규정 준수',
detail: '위험 지표 및 규정 준수 가이드, 변경 이력 조회',
path: '/screening-guide',
icon: '⚖️',
iconClass: 'gc-card-icon gc-card-icon-nexus',
menuCount: 2,
},
];
export default function MainMenu() {
const { theme, toggle } = useThemeContext();
return (
<div className="min-h-[70vh] flex flex-col items-center justify-center">
{/* 헤더 */}
<div className="text-center mb-10">
<h1 className="text-3xl font-bold text-wing-text mb-2">S&P Data Platform</h1>
<p className="text-sm text-wing-muted"> </p>
</div>
{/* 섹션 카드 */}
<div className="gc-cards">
{sections.map((section) => (
<Link key={section.path} to={section.path} className="gc-card">
<div className={section.iconClass}>
<span className="text-5xl">{section.icon}</span>
</div>
<h3>{section.title}</h3>
<p>{section.description}<br />{section.detail}</p>
</Link>
))}
</div>
{/* 테마 토글 */}
<button
onClick={toggle}
className="mt-8 px-3 py-1.5 rounded-lg text-sm bg-wing-card text-wing-muted
hover:text-wing-text border border-wing-border transition-colors"
title={theme === 'dark' ? '라이트 모드' : '다크 모드'}
>
{theme === 'dark' ? '☀️ 라이트 모드' : '🌙 다크 모드'}
</button>
</div>
);
}