import type { PatchRow, RepositoryRow } from "../../db/index.ts"; import { displayName } from "../../lib/users.ts"; import type { SessionUser } from "../../middleware/session.ts"; import { Avatar } from "../Avatar.tsx"; import { Layout } from "../layout.tsx"; import { Pagination, type PaginationInfo } from "../Pagination.tsx"; import { RepoHeader } from "../repos/RepoHeader.tsx"; import { RepoNav } from "../repos/RepoNav.tsx"; interface PatchListProps { user: SessionUser | null; repo: RepositoryRow; patches: (PatchRow & { author_username: string; author_avatar_version: number | null; })[]; status: string; counts: Record; pagination: PaginationInfo; } export function PatchList({ user, repo, patches, status, counts, pagination, }: PatchListProps) { return (
{patches.length === 0 ? (

No {status} patches.

) : (
    {patches.map((patch) => (
  • {patch.title} #{patch.number}
    by {displayName(patch.author_username)}
  • ))}
)}
); }