From 01bdbf76024f51bbc1072e33ceffb0c59ae45032 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Wed, 3 Jun 2026 10:08:41 -0700 Subject: move startDate to backend --- src/helpers/fetchInfo.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/helpers/fetchInfo.ts (limited to 'src/helpers/fetchInfo.ts') diff --git a/src/helpers/fetchInfo.ts b/src/helpers/fetchInfo.ts new file mode 100644 index 0000000..248cd98 --- /dev/null +++ b/src/helpers/fetchInfo.ts @@ -0,0 +1,9 @@ + +import { Info } from "../types/info"; + +export const fetchInfo = async (): Promise => { + const API_URL = process.env.REACT_APP_API_URL || "https://localhost:3000"; + const response = await fetch(`${API_URL}/info`); + const data = await response.json(); + return data as Info; +}; -- cgit v1.2.3