RegistryTabs
is an async component
The registry's tabs, Libraries and Codebases with how many there are.
import { libraries, shownCodebases } from "#codebase/tcmts/registry"; import { at, NavTabs } from "#codebase/tcmts/share"; export async function RegistryTabs({ tab }: { tab: string }) { const n = (await libraries()).length; const listed = (await shownCodebases()).length; return ( <NavTabs label="Registry" selected={tab} tabs={[ { id: "activity", label: "Activity", href: at("/") }, { id: "libraries", label: "Libraries", href: at("/libraries"), count: n }, { id: "codebases", label: "Codebases", href: at("/codebases"), count: listed }, ]} /> ); }