import { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { Terminal, Languages, Moon, Sun, Radar, BarChart3, Github, ExternalLink } from 'lucide-react'; import { ScanPage } from '@/pages/ScanPage'; import { ResultsPage } from '@/pages/ResultsPage'; import { LiveFeedProvider } from '@/contexts/LiveFeedContext'; import { Button } from '@/components/ui/button'; import './i18n'; type Page = 'scan' | 'results'; function App() { const { t, i18n } = useTranslation(); const [currentPage, setCurrentPage] = useState('scan'); const [isDark, setIsDark] = useState(() => { if (typeof window !== 'undefined') { const stored = localStorage.getItem('theme'); if (stored) return stored === 'dark'; return window.matchMedia('(prefers-color-scheme: dark)').matches; } return false; }); useEffect(() => { document.documentElement.classList.toggle('dark', isDark); localStorage.setItem('theme', isDark ? 'dark' : 'light'); }, [isDark]); return (
{/* Header */}
{/* Left: Logo + Nav */}
{/* Brand */}
fscan v2.1
{/* Navigation */}
{/* Right: Actions */}
{/* Main */}
{currentPage === 'scan' ? : }
{/* Footer */}
); } export default App;