"use client"; import { usePathname } from "next/navigation"; import { useState } from "react"; import Link from "next/link"; import Button from "@mui/material/Button"; import Drawer from "@mui/material/Drawer"; import List from "@mui/material/List"; import ListItem from "@mui/material/ListItem"; import MenuIcon from "@mui/icons-material/Menu"; import HomeIcon from "@mui/icons-material/Home"; import AboutIcon from "@mui/icons-material/Info"; import ModelsIcon from "@mui/icons-material/Memory"; import FrameworksIcon from "@mui/icons-material/Apps"; import CompareIcon from "@mui/icons-material/CompareArrows"; import ShoppingCartIcon from "@mui/icons-material/ShoppingCart"; export default function Header() { const [drawerOpen, setDrawerOpen] = useState(false); const pathname = usePathname(); const menuItems = [ { text: "Início", href: "/", icon: }, { text: "Sobre o Projeto", href: "/sobre", icon: }, { text: "Séries", href: "/series", icon: }, { text: "Frameworks", href: "/frameworks", icon: }, { text: "Comparar Séries", href: "/comparacao", icon: }, { text: "Catálogo de Placas", href: "/catalogo", icon: }, ]; function isActive(href) { if (href === "/") { return pathname === "/"; } return String(pathname).includes(href) && href !== "/"; } return (

ESPDocs

setDrawerOpen(false)} PaperProps={{ className: "bg-linear-to-br from-white via-blue-50 to-purple-50" }} >

Menu

{menuItems.map((item, index) => (
{ setDrawerOpen(false); }} href={item.href} > {item.icon} {item.text}
))}

Documentação não oficial

); }