import { Link, useLocation } from 'react-router-dom'; import { Home, Flame, PlusCircle, Library, Sun, Moon } from 'lucide-react'; import { useTheme } from '../context/ThemeContext'; export default function Navigation() { const location = useLocation(); const { theme, toggleTheme } = useTheme(); const isActive = (path: string) => location.pathname === path; const navItems = [ { path: '/dashboard', label: 'Tableau de bord', icon: Home }, { path: '/trending', label: 'Tendances', icon: Flame }, { path: '/library', label: 'Bibliothèque', icon: Library }, { path: '/add', label: 'Ajouter', icon: PlusCircle }, ]; return ( <> {/* Desktop Sidebar */} {/* Logo */} 🎙️ PODCASTIC Premium Audio {/* Navigation Links */} {navItems.map((item) => { const ActiveIcon = item.icon; const active = isActive(item.path); return ( {active && ( )} {item.label} ); })} {/* Footer — theme toggle + version */} Podcastic v1.0 {theme === 'dark' ? : } {/* Mobile Bottom Nav */} {navItems.map((item) => { const MobileIcon = item.icon; const active = isActive(item.path); return ( {active && } ); })} > ); }
Podcastic v1.0