diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-06-03 10:08:41 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-06-03 10:08:41 -0700 |
| commit | 01bdbf76024f51bbc1072e33ceffb0c59ae45032 (patch) | |
| tree | e2d7ed9eb3f2facfdb05c45c1d004569b9f18e06 /src/helpers/fetchInfo.ts | |
| parent | 88e2e3d62677f6af58b19d8e5d4d789b96d525db (diff) | |
move startDate to backend
Diffstat (limited to 'src/helpers/fetchInfo.ts')
| -rw-r--r-- | src/helpers/fetchInfo.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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<Info> => { + 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; +}; |
