interface BranchSelectorProps { repoName: string; branches: string[]; currentRef: string; view: "tree" | "commits" | "blob"; /** subpath for tree, full file path for blob */ path?: string; } export function BranchSelector({ repoName, branches, currentRef, view, path, }: BranchSelectorProps) { if (branches.length === 0) return ""; const isDetached = !branches.includes(currentRef); const shortRef = isDetached && currentRef.length > 8 ? currentRef.slice(0, 8) : currentRef; return (
{path && } ⎇
); }