12 lines
342 B
TypeScript
12 lines
342 B
TypeScript
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());
|
|
} |