Fix overload match

This commit is contained in:
FlorianSpeicher
2025-06-14 21:56:04 +02:00
parent 0c7a1c0af4
commit 0bbecfc694

View File

@@ -1,5 +1,5 @@
import { Slider, Typography, Box, useTheme } from "@mui/material";
import { useState, useEffect } from "react";
import { useState, useEffect, SyntheticEvent } from "react";
import { useTranslation } from "react-i18next";
type PriceSliderProps = {
@@ -25,7 +25,7 @@ export default function PriceSlider({ min = 0, max = 10000, onChange }: PriceSli
}
};
const handleCommitted = (_: Event, newValue: number | number[]) => {
const handleCommitted = (_: Event | SyntheticEvent<Element, Event>, newValue: number | number[]) => {
if (Array.isArray(newValue)) {
onChange?.([newValue[0], newValue[1]]);
}