DRB
{/* Desktop links */}
{allLinks.map(({ href, label }) => (
{label}
{label === "Nodes" && pending.length > 0 && (
{pending.length}
)}
{label === "Alerts" && unackedAlerts.length > 0 && (
{unackedAlerts.length}
)}
))}
{/* Theme toggle */}
{/* Profile avatar + dropdown (desktop) */}
{profileMenuOpen && (
<>
{/* Click-away backdrop */}
setProfileMenuOpen(false)} />
setProfileMenuOpen(false)}
className="block px-3 py-2 text-gray-300 hover:bg-gray-800 hover:text-white transition-colors"
>
Profile
>
)}
{/* Hamburger (mobile) */}
{/* Mobile drawer */}
{mobileOpen && (
{allLinks.map(({ href, label }) => (
setMobileOpen(false)}
className={`py-2 text-sm font-mono transition-colors flex items-center gap-2 ${
pathname.startsWith(href) ? "text-white" : "text-gray-500"
}`}
>
{label}
{label === "Nodes" && pending.length > 0 && (
{pending.length}
)}
{label === "Alerts" && unackedAlerts.length > 0 && (
{unackedAlerts.length}
)}
))}
setMobileOpen(false)}
className={`py-2 text-sm font-mono transition-colors flex items-center gap-2 ${
pathname.startsWith("/profile") ? "text-white" : "text-gray-500"
}`}
>
Profile
)}
);
}