Open History to see the last commit
1import axios from "axios";
2β
3// let count = 0;
4β
5export async function fetchProjects(key) {
6 console.info("fetch projects");
7 // if (count < 4) {
8 // count++;
9 // throw new Error("testing");
10 // }
11 let { data } = await axios.get(
12 `https://api.github.com/users/tannerlinsley/repos?sort=updated`
13 );
14 await new Promise((r) => setTimeout(r, 1000));
15 return data;
16}
17β
18export async function fetchProject(id) {
19 console.info("fetch project id", id);
20 let { data } = await axios.get(
21 `https://api.github.com/repos/tannerlinsley/${id}`
22 );
23 await new Promise((r) => setTimeout(r, 1000));
24 return data;
25}