import { chooseRepositoryFolder } from "../lib/picker"; /** * Opening a repository by choosing a folder. * * Any folder inside a repository will do — the Rust side searches upwards the * way git does, so picking a subdirectory works. */ export default function OpenRepository(props: { busy: boolean; onOpen: (path: string) => void; /** Styling differs between the title bar and the welcome pane. */ class?: string; children?: string; }) { async function choose() { const path = await chooseRepositoryFolder(); // Dismissing the dialog is an ordinary outcome, not something to report. if (path) props.onOpen(path); } return ( ); }