import { Header } from './components/Header'; import { HomePage } from './components/HomePage'; import { DocumentationPage } from './components/DocumentationPage'; import { useState } from 'react'; export default function App() { const [currentPage, setCurrentPage] = useState<'home' | 'documentation'>('home'); const [isSidebarOpen, setIsSidebarOpen] = useState(false); const [theme, setTheme] = useState<'light' | 'dark'>('light'); const toggleSidebar = () => { setIsSidebarOpen(!isSidebarOpen); }; const toggleTheme = () => { setTheme(theme === 'light' ? 'dark' : 'light'); }; const navigateToHome = () => { setCurrentPage('home'); setIsSidebarOpen(false); }; const navigateToDocumentation = () => { setCurrentPage('documentation'); setIsSidebarOpen(false); }; return (
{currentPage === 'home' ? ( ) : ( )} {/* Mobile overlay */} {isSidebarOpen && currentPage === 'documentation' && (
)}
); }