mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-06 14:00:09 +02:00
fix(desktop): use RENDERER_VITE_API_URL for renderer API host
Read API host from import.meta.env.RENDERER_VITE_API_URL instead of hardcoding it, so staging/dev builds point to the correct backend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useAuthStore } from '../stores/auth'
|
||||
|
||||
// Backend API host — change this when switching environments
|
||||
const API_HOST = 'https://api.multica.ai'
|
||||
// Backend API host — driven by RENDERER_VITE_API_URL env var (set in .env.production / .env.development)
|
||||
const API_HOST = import.meta.env.RENDERER_VITE_API_URL || 'https://api.multica.ai'
|
||||
|
||||
/**
|
||||
* Fetch request wrapper for desktop app.
|
||||
|
||||
4
apps/desktop/src/renderer/src/vite-env.d.ts
vendored
4
apps/desktop/src/renderer/src/vite-env.d.ts
vendored
@@ -1 +1,5 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly RENDERER_VITE_API_URL?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user