aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers/fetchInfo.ts
blob: 15cf9630ed285550b50661e78269819a3d3327dd (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 = import.meta.env.VITE_APP_HEARDLE_API_URL || "http://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