useAlbyInfo.ts raw

   1  import useSWR from "swr";
   2  
   3  import { AlbyInfo } from "src/types";
   4  import { swrFetcher } from "src/utils/swr";
   5  
   6  export function useAlbyInfo() {
   7    return useSWR<AlbyInfo>("/api/alby/info", swrFetcher, {
   8      dedupingInterval: 5 * 60 * 1000, // 5 minutes
   9    });
  10  }
  11