import React, { useState, useEffect } from 'react'; import { Menu, X } from 'lucide-react'; import { COURSE_CONTENT } from './constants'; import { Sidebar } from './components/Sidebar'; import { ContentSection } from './components/ContentSection'; import { CourseSection } from './types'; function App() { const [activeSection, setActiveSection] = useState(COURSE_CONTENT[0].sections[0]); const [isSidebarOpen, setIsSidebarOpen] = useState(false); const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); if (!mounted) return null; return (
{/* Mobile Overlay */} {isSidebarOpen && (
setIsSidebarOpen(false)} /> )} {/* Sidebar Navigation */} setIsSidebarOpen(false)} /> {/* Main Content Area */}
{/* Mobile Header */}
Ads & Analytics
{/* Dynamic Content */}
{/* Simple Navigation Footer for the content area */}
Partie: {COURSE_CONTENT.find(p => p.sections.some(s => s.id === activeSection.id))?.title} Formation v1.0
); } export default App;