diff --git a/frontend/src/stores/authStore.ts b/frontend/src/stores/authStore.ts index cadeb4d..2f39585 100644 --- a/frontend/src/stores/authStore.ts +++ b/frontend/src/stores/authStore.ts @@ -33,7 +33,9 @@ interface AuthState { clearAll: () => void; } -const API_URL = "http://localhost:8000/api"; +const API_URL = + import.meta.env.VITE_API_URL || + (import.meta.env.PROD ? "/api" : "http://localhost:8000/"); export const useAuthStore = create()( persist(