Skip to content

Commit 6655545

Browse files
authored
chore: refactor parallax in Image (#578)
1 parent adf214d commit 6655545

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Media/Image/Image.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ const Image = (props: ImageAllProps) => {
7373

7474
if (parallax) {
7575
const parallaxLevel = 2;
76-
springSetScrollY({springScrollY: height && scrollY > height ? height : scrollY});
77-
parallaxInterpolate = springScrollY.interpolate(
76+
springSetScrollY.start({springScrollY: height && scrollY > height ? height : scrollY});
77+
parallaxInterpolate = springScrollY.to(
7878
(value) => `translateY(-${Number(value) / parallaxLevel}px)`,
7979
);
8080
}

0 commit comments

Comments
 (0)