import { useState } from "react"; import { syncImportedRefs } from "~/fns/import-sync"; import { useAction } from "~/hooks/use-action"; import { Panel } from "~/ui/Panel"; import { Button } from "~/ui/Button"; import { ErrorBanner } from "~/ui/Callout"; export function ImportSyncPanel({ owner, repo, sourceUrl }: { owner: string; repo: string; sourceUrl: string }) { const sync = useAction(syncImportedRefs); const [summary, setSummary] = useState(null); return (

Imported from {sourceUrl}. Syncing copies branches and tags that exist there but not here; existing refs are left untouched.

{summary ?

{summary}

: null}
); }