import { useState } from 'react'; import Form from './components/Form'; import Dashboard from './components/Dashboard'; import Sidebar from './components/Sidebar'; import Home from './components/Home'; import { Home as HomeIcon } from 'lucide-react'; function App() { const [view, setView] = useState('home'); // 'home', 'form', 'result' const [result, setResult] = useState(null); const [loading, setLoading] = useState(false); const [historyKey, setHistoryKey] = useState(0); const handleProceed = () => setView('form'); const handleNewAssessment = () => { setResult(null); setView('form'); }; const handleSelectResult = (pastResult) => { setResult(pastResult); setView('result'); }; const handleNewResult = (newResult) => { setResult(newResult); setView('result'); setHistoryKey(k => k + 1); // Refresh sidebar history }; const handleBackToHome = () => setView('home'); return (