import { writable } from "svelte/store";
import type { GitRepo } from "./types";
import { fetchRepos } from "./api/git";

////////////////////////////////////////
// Git Repo Stores
////////////////////////////////////////
export const repos = writable<GitRepo[]>([]);

export async function loadRepos() {
    repos.set(await fetchRepos());
}