Files
zeekay a648eaec80 refactor(dashboard): one chrome, from @luxfi/ui
The dashboard had its own header, its own user menu (components/layout/user-menu.tsx)
and its own branding table (lib/branding.ts) that mapped a hostname to a brand a
second time — a copy of what @luxfi/ui/white-label already answers, and one that
drifted (it had no bootno.de row and pointed zoo at the wrong issuer).

Both are deleted. The nav is now `AppNav` from @luxfi/ui: brand, org switcher,
links, settings and the user menu, with the links collapsing into the same gui
Sheet the switchers use instead of the old `hidden md:flex` that simply vanished
on a phone with nothing to replace it.

Identity comes from IdentityProvider (IAM: get-account / get-organizations /
get-organization-projects). Credentials stay with @hanzo/iam — one PKCE flow and
one token store per surface; the chrome borrows only signIn and signOut.

`next build` passes: 60 routes.
2026-07-27 14:42:56 -07:00

37 lines
1.3 KiB
TypeScript

'use client'
import { AppNav } from '@luxfi/ui'
import { usePathname } from 'next/navigation'
// The nav is the ONE nav — brand, org switcher, links, settings, user menu —
// from @luxfi/ui. It used to be a bespoke header with a bespoke user menu and
// `hidden md:flex` links that simply vanished on a phone with nothing to
// replace them; the shared chrome collapses them into the same gui Sheet the
// switchers use, so mobile is a real presentation rather than an omission.
const LINKS = [
{ href: '/dashboard', label: 'Dashboard' },
{ href: '/vaults', label: 'Vaults' },
{ href: '/transactions', label: 'Transactions' },
{ href: '/intents', label: 'Intents' },
{ href: '/settlements', label: 'Settlements' },
{ href: '/policies', label: 'Policies' },
{ href: '/bridge', label: 'Bridge' },
{ href: '/team', label: 'Team' },
] as const
export function Nav() {
const pathname = usePathname()
return (
<AppNav
home="/dashboard"
links={LINKS.map((l) => ({ ...l, active: pathname.startsWith(l.href) }))}
settings={[
{ id: 'api-keys', label: 'API keys', href: '/settings/api-keys' },
{ id: 'webhooks', label: 'Webhooks', href: '/settings/webhooks' },
{ id: 'devices', label: 'Devices', href: '/settings/devices' },
]}
userItems={[{ id: 'audit', label: 'Audit log', href: '/audit' }]}
/>
)
}