fix: Behebt "window is not defined" Fehler und ermöglicht erfolgreichen Build
- Import von `chartjs-plugin-zoom` in `LoopMeasurementChart.tsx` dynamisch in `useEffect` verschoben. - Stellt sicher, dass `window` nur im Client-Umfeld genutzt wird. - Erfolgreicher Next.js Production-Build getestet.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx
|
||||
"use client"; // components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx
|
||||
import React, { useEffect } from "react";
|
||||
import DateRangePicker from "../DateRangePicker";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
@@ -72,8 +72,12 @@ const LoopChartActionBar: React.FC = () => {
|
||||
<div className="flex justify-end items-center p-2 bg-gray-100 rounded-lg space-x-2">
|
||||
{/* Datumsauswahl */}
|
||||
<DateRangePicker
|
||||
setVonDatum={(date) => dispatch(setVonDatum(date))}
|
||||
setBisDatum={(date) => dispatch(setBisDatum(date))}
|
||||
setVonDatum={(date) =>
|
||||
dispatch(setVonDatum(date.toISOString().split("T")[0]))
|
||||
}
|
||||
setBisDatum={(date) =>
|
||||
dispatch(setBisDatum(date.toISOString().split("T")[0]))
|
||||
}
|
||||
/>
|
||||
|
||||
{/* Dropdown für DIA-Modus */}
|
||||
|
||||
Reference in New Issue
Block a user