diff --git a/ui/src/global.d.ts b/ui/src/global.d.ts index 069b42ba..a8fccb46 100644 --- a/ui/src/global.d.ts +++ b/ui/src/global.d.ts @@ -1,4 +1,3 @@ interface Window { monaco: typeof import('monaco-editor'); - VITE_API_HOST?: string; } diff --git a/ui/src/services/axios.ts b/ui/src/services/axios.ts index 2acb1795..779b278c 100644 --- a/ui/src/services/axios.ts +++ b/ui/src/services/axios.ts @@ -1,11 +1,9 @@ import axios from 'axios'; import Cookies from 'js-cookie'; -const DOMAIN = window?.VITE_API_HOST - ? `${window?.VITE_API_HOST}/api/v1/` - : import.meta.env.VITE_API_HOST - ? `${import.meta.env.VITE_API_HOST}/api/v1/` - : 'http://localhost:3000/api/v1/'; +const DOMAIN = import.meta.env.VITE_API_HOST + ? `${import.meta.env.VITE_API_HOST}/api/v1/` + : 'http://localhost:3000/api/v1/'; export const domain = DOMAIN; export const axiosInstance = axios.create({