import type { RepositoryRow } from "../../db/index.ts"; import type { SessionUser } from "../../middleware/session.ts"; import type { TreeEntry } from "../../services/git.ts"; import { Layout } from "../layout.tsx"; import { RepoHeader } from "../repos/RepoHeader.tsx"; import { BranchSelector } from "./BranchSelector.tsx"; import { FileTreeTable } from "./FileTreeTable.tsx"; import { RepoNav } from "./RepoNav.tsx"; interface FileTreeProps { user: SessionUser | null; repo: RepositoryRow; ref: string; subpath: string; entries: TreeEntry[]; branches: string[]; readmeHtml?: string | null; } export function FileTree({ user, repo, ref: treeRef, subpath, entries, branches, readmeHtml, }: FileTreeProps) { const parts = subpath ? subpath.split("/") : []; return (
{subpath && ( )} {readmeHtml && (
README
{readmeHtml}
)}
); }