[FIX] (front) fix the environment semection in production mode

This commit is contained in:
Edouard DUPIN 2025-01-11 14:28:19 +01:00
parent 653e77160b
commit 2e62577103

View File

@ -80,7 +80,6 @@ const environment_hybrid: Environment = {
tokenStoredInPermanentStorage: false, tokenStoredInPermanentStorage: false,
}; };
export const environment = environment_local;
/** /**
* Check if the current environment is for development * Check if the current environment is for development
@ -90,6 +89,9 @@ export const isDevelopmentEnvironment = () => {
return import.meta.env.MODE === 'development'; return import.meta.env.MODE === 'development';
}; };
export const environment = isDevelopmentEnvironment() ? environment_local : environment_back_prod;
/** /**
* get the current REST api URL. Depend on the VITE_API_BASE_URL env variable. * get the current REST api URL. Depend on the VITE_API_BASE_URL env variable.
* @returns The URL with http(s)://*** * @returns The URL with http(s)://***