import React, { useState } from 'react'; import { createRoot } from 'react-dom/client'; const App = () => { const [activeView, setActiveView] = useState('dashboard'); const styles = { container: { display: 'flex', minHeight: '100vh', backgroundColor: '#f4f6f8', }, sidebar: { width: '260px', backgroundColor: '#0d2c4f', color: 'white', padding: '20px', display: 'flex', flexDirection: 'column', boxShadow: '2px 0 5px rgba(0,0,0,0.1)', }, mainContent: { flex: 1, padding: '30px 40px', overflowY: 'auto', }, header: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '30px', }, headerTitle: { fontSize: '28px', fontWeight: 'bold', color: '#1c1c1e', }, schoolName: { fontSize: '24px', fontWeight: 'bold', textAlign: 'center', padding: '20px 0', borderBottom: '1px solid #3a5b82', marginBottom: '20px', }, nav: { display: 'flex', flexDirection: 'column', gap: '10px', }, navItem: { display: 'flex', alignItems: 'center', padding: '12px 15px', borderRadius: '8px', cursor: 'pointer', transition: 'background-color 0.3s, color 0.3s', fontSize: '16px', }, navIcon: { marginRight: '15px', width: '24px', height: '24px' }, cardContainer: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', gap: '25px', }, card: { backgroundColor: 'white', padding: '25px', borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.08)', display: 'flex', flexDirection: 'column', }, cardTitle: { fontSize: '18px', fontWeight: '500', color: '#555', marginBottom: '10px' }, cardValue: { fontSize: '32px', fontWeight: 'bold', color: '#0d2c4f', }, placeholder: { backgroundColor: 'white', padding: '40px', borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.08)', textAlign: 'center', fontSize: '20px', color: '#777', } }; const NavItem = ({ icon, text, viewName }) => (
setActiveView(viewName)} > {icon} {text}
); const Dashboard = () => (
Total Étudiants 482
Paiements en attente 15
Prochains Examens 3
Annonces Récentes 2
); const Placeholder = ({title}) => (

{title}

Ce module est en cours de développement.

); const renderView = () => { switch(activeView) { case 'dashboard': return ; case 'students': return ; case 'academics': return ; case 'finance': return ; case 'communication': return ; default: return ; } }; const viewTitles = { dashboard: 'Tableau de Bord', students: 'Étudiants', academics: 'Académique', finance: 'Finance', communication: 'Communication' }; const icons = { dashboard: , students: , academics: , finance: , communication: }; return (

{viewTitles[activeView]}

{renderView()}
); }; const container = document.getElementById('root'); const root = createRoot(container); root.render();