From 885f877ef0b4376017d62ed75d9abf911df6512e Mon Sep 17 00:00:00 2001 From: Dmytro Kondakov Date: Mon, 14 Apr 2025 11:41:29 +0200 Subject: [PATCH] fix(network): restore conditional base URL for development environment - Reintroduced conditional logic for the base URL to switch between local and production endpoints based on the environment. --- frontend/src/network/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/network/index.ts b/frontend/src/network/index.ts index b663255..c5b58b0 100644 --- a/frontend/src/network/index.ts +++ b/frontend/src/network/index.ts @@ -19,11 +19,9 @@ type BaseRequestParams = Partial<{ method: "GET" | "POST"; }>; -// export const base = import.meta.env.DEV -// ? "http://localhost:3040" -// : "https://haystack.johncosta.tech"; - -export const base = "https://haystack.johncosta.tech"; +export const base = import.meta.env.DEV + ? "http://localhost:3040" + : "https://haystack.johncosta.tech"; const getBaseRequest = ({ path, body, method }: BaseRequestParams): Request => { return new Request(`${base}/${path}`, {