export const getApiUrl = () => { // If window is undefined, we are running on the server (SSR in Docker) if (typeof window === "undefined") { return process.env.INTERNAL_API_URL || "http://latosa-backend:4001"; } // Otherwise, we are running in the user's browser return process.env.NEXT_PUBLIC_API_URL; };