From a1b58ba9164a5fb94715264630613b03fb74f57c Mon Sep 17 00:00:00 2001 From: Markov Date: Sun, 15 Feb 2026 18:58:23 +0100 Subject: [PATCH] fix: simplify API_BASE, remove Docker SSR workaround --- next-env.d.ts | 6 ++++++ src/lib/api.ts | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 next-env.d.ts diff --git a/next-env.d.ts b/next-env.d.ts new file mode 100644 index 0000000..830fb59 --- /dev/null +++ b/next-env.d.ts @@ -0,0 +1,6 @@ +/// +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/src/lib/api.ts b/src/lib/api.ts index 1a0e6c9..6cb4b9f 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -1,8 +1,4 @@ -// SSR runs inside Docker → use internal service name; browser uses public URL -const API_BASE = - typeof window === "undefined" - ? (process.env.API_INTERNAL_URL || "http://tracker:8100") - : (process.env.NEXT_PUBLIC_API_URL || "http://localhost:8100"); +const API_BASE = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8100"; async function request(path: string, opts?: RequestInit): Promise { const res = await fetch(`${API_BASE}${path}`, {