web/app/collab/collab-nav.tsxblame
View source
0b4b5821"use client";
0b4b5822
0b4b5823import Link from "next/link";
0b4b5824import { useParams } from "next/navigation";
0b4b5825import { CollabLogo } from "@/app/components/collab-logo";
0b4b5826import { NavBar } from "@/app/components/ui/navbar";
0b4b5827import { CollabNavActionsSlot } from "./collab-nav-actions";
10621c58import { useAppSwitcherItems } from "@/lib/use-app-switcher";
0b4b5829
0b4b58210export function CollabNav() {
0b4b58211 const params = useParams<{ owner?: string; repo?: string }>();
0b4b58212 const owner = params?.owner;
0b4b58213 const repo = params?.repo;
10621c514 const appSwitcherItems = useAppSwitcherItems("collab", { owner, repo });
0b4b58215
0b4b58216 return (
0b4b58217 <NavBar
0b4b58218 logo={<CollabLogo size={28} />}
10621c519 appSwitcherItems={appSwitcherItems}
0b4b58220 productName="Collab"
0b4b58221 showProductName={!owner}
0b4b58222 breadcrumbs={
0b4b58223 <>
0b4b58224 {owner && (
0b4b58225 <>
0b4b58226 <span style={{ color: "var(--text-faint)" }}>/</span>
0b4b58227 <Link
0b4b58228 href={`/${owner}`}
0b4b58229 className="hover:underline truncate"
0b4b58230 style={{ color: "var(--text-muted)" }}
0b4b58231 >
0b4b58232 {owner}
0b4b58233 </Link>
0b4b58234 </>
0b4b58235 )}
0b4b58236 {owner && repo && (
0b4b58237 <>
0b4b58238 <span style={{ color: "var(--text-faint)" }}>/</span>
0b4b58239 <span className="truncate" style={{ color: "var(--text-primary)" }}>
0b4b58240 {repo}
0b4b58241 </span>
0b4b58242 </>
0b4b58243 )}
0b4b58244 </>
0b4b58245 }
0b4b58246 actions={<CollabNavActionsSlot />}
0b4b58247 />
0b4b58248 );
0b4b58249}