From 002bba20f95ff480751922cc17f93d7bf457d3d7 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 9 Aug 2023 09:35:23 -0400 Subject: [PATCH] refactor(Slider.tsx): remove unused import and type declaration fix(Slider.tsx): fix type error in onClick event handler --- client/src/components/ui/Slider.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/client/src/components/ui/Slider.tsx b/client/src/components/ui/Slider.tsx index 7a1f326c37..fefef62519 100644 --- a/client/src/components/ui/Slider.tsx +++ b/client/src/components/ui/Slider.tsx @@ -1,12 +1,9 @@ -'use client'; - import * as React from 'react'; import * as SliderPrimitive from '@radix-ui/react-slider'; import { useDoubleClick } from '@zattoo/use-double-click'; +import type { clickEvent } from '@zattoo/use-double-click'; import { cn } from '../../utils'; -type clickEvent = (event: React.MouseEvent) => void; - interface SliderProps extends React.ComponentPropsWithoutRef { doubleClickHandler?: clickEvent; } @@ -23,7 +20,7 @@ const Slider = React.forwardRef, S { return; })