Open History to see the last commit
1export async function fetchProjects(): Promise<
2 Array<{ name: string; full_name: string }>
3> {
4 console.info('Fetching projects')
5β
6 const response = await fetch(
7 `https://api.github.com/users/TanStack/repos?sort=updated`,
8 )
9 await new Promise((r) => setTimeout(r, 1000))
10 return await response.json()
11}
12β
13export async function fetchProject(id: string): Promise<{
14 forks_count: number
15 stargazers_count: number
16 watchers_count: number
17}> {
18 console.info('Fetching project:', id)
19β
20 const response = await fetch(`https://api.github.com/repos/${id}`)
21 await new Promise((r) => setTimeout(r, 1000))
22 return await response.json()
23}