Skip to content

Commit

Permalink
fix eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
zirgulis committed Jan 10, 2025
1 parent a8a191c commit a1e4533
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Hoverable/ActiveHoverable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function ActiveHoverable({onHoverIn, onHoverOut, shouldHandleScroll, shouldFreez
}, []);

const handleMouseEvents = useCallback(
(type: 'enter' | 'leave' | 'blur') => (e: MouseEvent) => {
(type: 'enter' | 'leave' | 'blur') => () => {
if (shouldFreezeCapture) {
return;
}
Expand All @@ -99,15 +99,15 @@ function ActiveHoverable({onHoverIn, onHoverOut, shouldHandleScroll, shouldFreez
return cloneElement(child, {
ref: mergeRefs(elementRef, outerRef, child.ref),
onMouseEnter: (e: MouseEvent) => {
handleMouseEvents('enter')(e);
handleMouseEvents('enter')();
onMouseEnter?.(e);
},
onMouseLeave: (e: MouseEvent) => {
handleMouseEvents('leave')(e);
handleMouseEvents('leave')();
onMouseLeave?.(e);
},
onBlur: (e: MouseEvent) => {
handleMouseEvents('blur')(e);
handleMouseEvents('blur')();
onBlur?.(e);
},
});
Expand Down

0 comments on commit a1e4533

Please sign in to comment.