aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers/fetchInfo.ts
blob: 6da28aaae36d70ef3cbb64461e5b4cf3a4230505 (plain) (blame)
1
2
3
4
5
6
7
8
9

import { Info } from "../types/info";

export const fetchInfo = async (): Promise<Info> => {
  const API_URL = process.env.REACT_APP_HEARDLE_API_URL || "https://localhost:3000";
  const response = await fetch(`${API_URL}/info`);
  const data = await response.json();
  return data as Info;
};
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage