import type { RepositoryRow } from "../../db/index.ts"; import type { SessionUser } from "../../middleware/session.ts"; import type { CommitEntry } from "../../services/git.ts"; import { Layout } from "../layout.tsx"; import { RepoHeader } from "../repos/RepoHeader.tsx"; import { BranchSelector } from "./BranchSelector.tsx"; import { RepoNav } from "./RepoNav.tsx"; interface CommitLogProps { user: SessionUser | null; repo: RepositoryRow; ref: string; commits: CommitEntry[]; branches: string[]; /** URL for the next (older) page, or null if this is the last page. */ olderUrl: string | null; /** URL for the previous (newer) page, or null if this is the first page. */ newerUrl: string | null; } export function CommitLog({ user, repo, ref: logRef, commits, branches, olderUrl, newerUrl, }: CommitLogProps) { return (

Commits

{commits.length === 0 ? (

No commits yet.

) : ( )} {(newerUrl || olderUrl) && ( )}
); }