File tree Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ const Gallery = () => {
2626 const controls = useAnimation ( ) ;
2727 const [ isPaused , setIsPaused ] = useState ( false ) ;
2828 const [ offset , setOffset ] = useState ( 0 ) ; // offset in px
29- const [ hoveredIdx , setHoveredIdx ] = useState < number | null > ( null ) ;
3029
3130 // Start animation
3231 useEffect ( ( ) => {
@@ -49,15 +48,13 @@ const Gallery = () => {
4948 // When hover, set offset so hovered image is first
5049 const handleMouseEnter = ( idx : number ) => {
5150 setIsPaused ( true ) ;
52- setHoveredIdx ( idx ) ;
5351 setOffset ( - idx * IMAGE_WIDTH ) ;
5452 controls . set ( { x : - idx * IMAGE_WIDTH } ) ;
5553 } ;
5654
5755 // On leave, resume animation from current offset
5856 const handleMouseLeave = ( ) => {
5957 setIsPaused ( false ) ;
60- setHoveredIdx ( null ) ;
6158 } ;
6259
6360 return (
You can’t perform that action at this time.
0 commit comments