From ef514b9c4465de45d23da17eed1cc9089d2acb68 Mon Sep 17 00:00:00 2001 From: mudabbir-ahmad Date: Mon, 6 Apr 2026 02:02:21 +0100 Subject: [PATCH] Update API base URL to production server; remove dynamic URL handling for cleaner configuration --- src/components/API/API.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/components/API/API.js b/src/components/API/API.js index 3e701b0..4692ada 100644 --- a/src/components/API/API.js +++ b/src/components/API/API.js @@ -1,19 +1,5 @@ -import Constants from 'expo-constants'; - -const getBaseUrl = () => { - // In Expo Go the debuggerHost is "192.168.x.x:8081" — grab the IP - const debuggerHost = Constants.expoGoConfig?.debuggerHost; - if (debuggerHost) { - const ip = debuggerHost.split(':')[0]; - return `http://${ip}:3000`; - } - // Fallback for web / production - return 'http://localhost:3000'; -}; - -export const API_BASE_URL = getBaseUrl(); -//export const API_BASE_URL = 'http://api.bobby.ip-ddns.com'; // Production server URL - +//export const API_BASE_URL = 'http://192.168.8.100:3000'; +export const API_BASE_URL = 'http://api.bobby.ip-ddns.com'; const API = {}; API.get = (endpoint) => callFetch(endpoint, 'GET');