/ src / api / stats.ts
stats.ts
 1  import { API_URL } from "./constants"
 2  
 3  export interface Stats {
 4      repos: {
 5          total: number
 6      }
 7  }
 8  
 9  export const getStats = async (): Promise<Stats> =>
10      fetch(API_URL + "/stats")
11          .then(res => res.json())