feat: Umgebungsspezifisches Laden von Datenquellen implementiert
- Alle fetch-Services (TDM, TDR, analoge/digitale Eingänge/Ausgänge, SystemSettings usw.) angepasst, um `NEXT_PUBLIC_NODE_ENV` zu verwenden. - Entwicklungsumgebung lädt Daten aus /CPLmockData/... - Produktionsumgebung verwendet echte Endpunkte mit /CPL?/CPL/... - .env.production und .env.development korrekt berücksichtigt - loadWindowVariables, WindowVariablesInitializer und verwandte Dateien bereinigt - Mockdaten erscheinen nicht mehr versehentlich in Produktionsumgebung
This commit is contained in:
@@ -10,7 +10,7 @@ export function useDigitalInputData() {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
const isDevelopment = process.env.NODE_ENV === "development";
|
||||
const isDevelopment = window.location.hostname === "localhost";
|
||||
const script = document.createElement("script");
|
||||
|
||||
script.src = isDevelopment
|
||||
|
||||
Reference in New Issue
Block a user