Skip to content

Commit ec278ff

Browse files
committed
fix: image gallery animations issue
1 parent a88af85 commit ec278ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/src/components/ImageGallery/hooks/useAnimatedGalleryStyle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ export const useAnimatedGalleryStyle = ({
7272
{ scaleX: -1 },
7373
{ translateY: yScaleOffset },
7474
{
75-
translateX: -translateX.value - xScaleOffset,
75+
translateX: -xScaleOffset,
7676
},
7777
{ scale: oneEighth },
7878
],
7979
};
80-
}, []);
80+
}, [index]);
8181

8282
return [animatedGalleryStyle, animatedStyles];
8383
};

0 commit comments

Comments
 (0)