import { useGit } from "@yaakapp-internal/git"; import { showDialog } from "../../lib/dialog"; import { Button } from "../core/Button"; import { IconButton } from "../core/IconButton"; import { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from "../core/Table"; import { gitCallbacks } from "./callbacks"; import { addGitRemote } from "./showAddRemoteDialog"; interface Props { dir: string; onDone: () => void; } export function GitRemotesDialog({ dir }: Props) { const [{ remotes }, { rmRemote }] = useGit(dir, gitCallbacks(dir)); return ( Name URL {remotes.data?.map((r) => ( {r.name} {r.url} rmRemote.mutate({ name: r.name })} /> ))}
); } GitRemotesDialog.show = (dir: string) => { showDialog({ id: "git-remotes", title: "Manage Remotes", size: "md", render: ({ hide }) => , }); };