"use client"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; const items = [ { href: "/overview", label: "Overview", icon: "๐Ÿ " }, { href: "/machines", label: "Machines", icon: "๐Ÿญ" }, { href: "/reports", label: "Reports", icon: "๐Ÿ“Š" }, { href: "/settings", label: "Settings", icon: "โš™๏ธ" }, ]; export function Sidebar() { const pathname = usePathname(); const router = useRouter(); async function onLogout() { await fetch("/api/logout", { method: "POST" }); router.push("/login"); router.refresh(); } return ( ); }