Skip to content

Commit 36fd27f

Browse files
committed
fix: gsap method issue
1 parent 9ce848c commit 36fd27f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pwa/hooks/con/useAnimation.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import useIntersection from "hooks/useIntersection";
66
export type DirectionType = "bottom" | "left" | "right" | "top" | "scale";
77

88
const fadeIn = (element: gsap.TweenTarget, duration: number, delay: number) => {
9-
gsap.to(element, duration, {
9+
gsap.to(element, {
1010
opacity: 1,
11+
duration,
1112
x: 0,
1213
y: 0,
1314
scale: 1,
@@ -45,8 +46,9 @@ const fadeOut = (
4546
x = animationValue || +100;
4647
}
4748

48-
gsap.to(element, duration, {
49+
gsap.to(element, {
4950
opacity: 0,
51+
duration,
5052
x,
5153
y,
5254
scale,

0 commit comments

Comments
 (0)