Intelligence
Artifacts
Browse the repository, read documents, and manage the governance folders. Source, runtime, and infrastructure are read-only.
Repository
assignment-dispatch-button.tsxassignment-status-badge.tsxassignments-panel.tsxcreate-mission-form.tsxgovernance-panels.tsxmission-dispatch.tsxmission-edit.tsxmission-state-actions.tsxmission-status-badge.tsxobjective-edit.tsxobjective-status-badge.tsxobjective-status-select.tsxobjectives-panel.tsxreport-list.tsxwork-orders-panel.tsx
README.md
CONSTITUTION_COMPLIANCE_AUDIT_V1.mdREADME.md
repositories/aaf-holdings/hq01/components/layout/mobile-nav.tsx
1.5 KB
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { cn } from "@/lib/utils";
import { ALL_NAV_ITEMS } from "./nav";
function isActive(pathname: string, href: string): boolean {
if (href === "/") return pathname === "/";
return pathname === href || pathname.startsWith(href + "/");
}
export function MobileNav() {
const pathname = usePathname();
return (
<div className="md:hidden border-b border-border bg-sidebar text-sidebar-foreground">
<div className="flex h-14 items-center gap-2 px-4">
<div className="flex h-7 w-7 items-center justify-center rounded-md bg-white/10 text-xs font-semibold">
HQ
</div>
<span className="text-sm font-semibold">HQ01</span>
</div>
<nav className="flex gap-1 overflow-x-auto px-3 pb-2">
{ALL_NAV_ITEMS.map((item) => {
const active = isActive(pathname, item.href);
const Icon = item.icon;
return (
<Link
key={item.href}
href={item.href}
className={cn(
"flex shrink-0 items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",
active
? "bg-white/10 text-white"
: "text-sidebar-muted hover:bg-white/5",
)}
>
<Icon className="h-3.5 w-3.5" />
{item.label}
</Link>
);
})}
</nav>
</div>
);
}
root · /srv/aaf