From e9318708e1c09cea41aaab29a31bd0e552be8d0e Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Thu, 4 Sep 2025 19:22:43 -0400 Subject: [PATCH] proper api address from env --- www/app/lib/apiClient.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/app/lib/apiClient.tsx b/www/app/lib/apiClient.tsx index 9c278cef..8ba11c6a 100644 --- a/www/app/lib/apiClient.tsx +++ b/www/app/lib/apiClient.tsx @@ -9,11 +9,14 @@ import { useSuspenseQuery, } from "@tanstack/react-query"; import createFetchClient from "openapi-react-query"; +import { assertExistsAndNonEmptyString } from "./utils"; + +const API_URL = assertExistsAndNonEmptyString(process.env.NEXT_PUBLIC_API_URL); // Create the base openapi-fetch client with a default URL // The actual URL will be set via middleware in AuthProvider export const client = createClient({ - baseUrl: "http://127.0.0.1:1250", + baseUrl: API_URL, }); export const $api = createFetchClient(client);