diff --git a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx index ae84da8..ba5ea41 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx @@ -1,7 +1,5 @@ -// components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx import React, { useState } from "react"; import DateRangePicker from "../DateRangePicker"; -import LoopMeasurementChart from "./LoopMeasurementChart"; import { useDispatch } from "react-redux"; import { setChartData } from "../../../../../../redux/slices/chartDataSlice"; @@ -11,8 +9,14 @@ const LoopChartActionBar: React.FC = () => { const handleFetchData = async () => { try { - const response = await fetch("/mockData.json"); + const apiUrl = + process.env.NODE_ENV === "development" + ? "/mockData.json" + : "/CPL?seite.ACP&DIA1=2025;01;01;2025;07;31;2;4"; + + const response = await fetch(apiUrl); const data = await response.json(); + if (Array.isArray(data)) { console.log("Daten geladen:", data); dispatch(setChartData(data)); diff --git a/config/webVersion.ts b/config/webVersion.ts index 418eabe..a65e6df 100644 --- a/config/webVersion.ts +++ b/config/webVersion.ts @@ -6,5 +6,5 @@ 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). */ -const webVersion = "1.6.47"; +const webVersion = "1.6.48"; export default webVersion;