import { lazy, Suspense, Component, type ReactNode } from 'react' import { BrowserRouter, Routes, Route } from 'react-router-dom' import { ThemeProvider } from './contexts/ThemeContext.tsx' import { I18nProvider } from './i18n/I18nContext.tsx' import AppLayout from './components/layout/AppLayout.tsx' import LoadingSpinner from './components/common/LoadingSpinner.tsx' const Dashboard = lazy(() => import('./pages/Dashboard.tsx')) const JobMonitor = lazy(() => import('./pages/JobMonitor.tsx')) const DataPipeline = lazy(() => import('./pages/DataPipeline.tsx')) const AreaStats = lazy(() => import('./pages/AreaStats.tsx')) const ApiExplorer = lazy(() => import('./pages/ApiExplorer.tsx')) const BASE_URL = import.meta.env.VITE_BASE_URL || '/signal-batch' /* React Error Boundary — 페이지 렌더링 에러 시 전체 앱 crash 방지 */ class ErrorBoundary extends Component<{ children: ReactNode }, { error: Error | null }> { state: { error: Error | null } = { error: null } static getDerivedStateFromError(error: Error) { return { error } } render() { if (this.state.error) { return (

Rendering Error

{this.state.error.message}

) } return this.props.children } } export default function App() { return ( }> }>} /> }>} /> }>} /> }>} /> }>} /> ) }