import React, { useState } from 'react' import { BrowserRouter, Routes, Route, Navigate, NavLink } from 'react-router-dom' import { LayoutDashboard, Map, Monitor, QrCode, Package, AlertTriangle, ShieldCheck, Wrench, Boxes, Brain, LogOut } from 'lucide-react' import Login from './pages/Login' import Dashboard from './pages/Dashboard' import FloorMap from './pages/FloorMap' import EpaperManagement from './pages/EpaperManagement' import QrTracking from './pages/QrTracking' import ProductionOrders from './pages/ProductionOrders' import AndonBoard from './pages/AndonBoard' import QualityControl from './pages/QualityControl' import EquipmentStatus from './pages/EquipmentStatus' import AiFactory from './pages/AiFactory' const NAV_ITEMS = [ { to: '/dashboard', icon: LayoutDashboard, label: '대시보드' }, { to: '/floor-map', icon: Map, label: '공장 배치도' }, { to: '/epaper', icon: Monitor, label: 'e-Paper 관리' }, { to: '/qr', icon: QrCode, label: 'QR WIP 추적' }, { to: '/orders', icon: Package, label: '생산 오더' }, { to: '/andon', icon: AlertTriangle, label: '안돈 현황판' }, { to: '/quality', icon: ShieldCheck, label: '품질 관리' }, { to: '/equipment', icon: Wrench, label: '설비 현황' }, { to: '/inventory', icon: Boxes, label: '재고 관리' }, { to: '/ai', icon: Brain, label: 'AI 공장 분석' }, ] function Sidebar() { const user = JSON.parse(localStorage.getItem('fa_user') || '{}') return ( ) } function RequireAuth({ children }: { children: React.ReactNode }) { const token = localStorage.getItem('fa_token') return token ? <>{children} : } function Layout({ children }: { children: React.ReactNode }) { return (
{children}
) } export default function App() { return ( } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> ) }