import type { LabelRow, RepositoryRow } from "../../db/index.ts"; import type { SessionUser } from "../../middleware/session.ts"; import { Layout } from "../layout.tsx"; import { RepoHeader } from "./RepoHeader.tsx"; import { RepoNav } from "./RepoNav.tsx"; interface RepoSettingsProps { user: SessionUser; repo: RepositoryRow; branches: string[]; labels: LabelRow[]; success?: string; error?: string; } export function RepoSettings({ user, repo, branches, labels, success, error, }: RepoSettingsProps) { return (
{success &&

{success}

} {error &&

{error}

}
{branches.length > 0 ? ( ) : (

No branches yet — push your first commit to set the default branch.

)}

Labels

{labels.length > 0 && (
{labels.map((label) => (
{label.name}
))}
)}

Danger zone

Delete this repository

Once deleted, there is no going back.

Delete repository
Delete {repo.name}? This cannot be undone.
); }