import { API } from "./Constants" export function fetchAPI( url: string, payload: unknown, method = "POST", ): Promise { return fetch(`${API}/${url}`, { method, headers: { Accept: "application/json", "Content-Type": "application/json", }, body: JSON.stringify(payload), }) }