esLint
This commit is contained in:
@@ -2,12 +2,12 @@ import { Dispatch, SetStateAction } from "react";
|
||||
|
||||
// Funktion zur Änderung der Werte
|
||||
const handleChange = (
|
||||
setter: Dispatch<SetStateAction<any[]>>, // Typ für den Setter
|
||||
setter: Dispatch<SetStateAction<string[]>>, // Typ für den Setter (z.B. string[])
|
||||
e: React.ChangeEvent<HTMLInputElement>, // Typ für das Event
|
||||
slot: number // Typ für den Slot
|
||||
) => {
|
||||
const value = e.target.value;
|
||||
setter((prev: any[]) => {
|
||||
setter((prev: string[]) => {
|
||||
// Typ für den vorherigen Zustand
|
||||
const updated = [...prev];
|
||||
updated[slot] = value;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// components/main/kabelueberwachung/kue705FO/handlers/handleCloseChartModal.ts
|
||||
import { Chart } from "chart.js";
|
||||
|
||||
const handleCloseChartModal = (
|
||||
setShowChartModal: (value: boolean) => void,
|
||||
chartInstance: any
|
||||
chartInstance: React.MutableRefObject<Chart | null>
|
||||
) => {
|
||||
if (chartInstance.current) {
|
||||
console.log("Chart wird beim Schließen des Modals zerstört.");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// components/main/kabelueberwachung/kue705FO/handlers/handleRefreshClick.ts
|
||||
import { Dispatch, SetStateAction } from "react";
|
||||
import { goLoop } from "../../../../../utils/goLoop";
|
||||
import { goTDR } from "../../../../../utils/goTDR";
|
||||
import { goLoop } from "@/utils/goLoop";
|
||||
import { goTDR } from "@/utils/goTDR";
|
||||
|
||||
const handleRefreshClick = (
|
||||
activeButton: "Schleife" | "TDR",
|
||||
|
||||
@@ -32,13 +32,13 @@ export interface HandleSaveParams {
|
||||
speicherintervall: number[];
|
||||
};
|
||||
slot: number;
|
||||
dispatch: any;
|
||||
dispatch: import("redux").Dispatch;
|
||||
onModulNameChange: (id: string) => void;
|
||||
onClose: () => void;
|
||||
onFormUpdate?: (updated: any) => void; // Added this property
|
||||
onFormUpdate?: (updated: Record<string, unknown>) => void; // Specify a more precise type instead of 'any'
|
||||
}
|
||||
|
||||
const isDifferent = (a: any, b: any): boolean => {
|
||||
const isDifferent = (a: unknown, b: unknown): boolean => {
|
||||
const aNum = Number(a);
|
||||
const bNum = Number(b);
|
||||
if (!isNaN(aNum) && !isNaN(bNum)) {
|
||||
@@ -62,7 +62,7 @@ const handleSave = async ({
|
||||
onModulNameChange,
|
||||
onClose,
|
||||
}: HandleSaveParams): Promise<void> => {
|
||||
const changesForFile: Record<string, any> = {};
|
||||
const changesForFile: Record<string, string | number> = {};
|
||||
|
||||
if (isDifferent(ids[slot], originalValues.kueID[slot])) {
|
||||
changesForFile.KID = ids[slot];
|
||||
|
||||
Reference in New Issue
Block a user