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}`, {