Skip to content

Commit 5722ad2

Browse files
committed
chore: remove uncomments and unncessary hook deps
1 parent 84e5f04 commit 5722ad2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

example/src/screens/usage/TwitterProfile.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const HeaderComponent: React.FC<ScrollHeaderProps> = ({ showNavBar, scrollY }) =
5858

5959
const blurOpacity = useDerivedValue(() => {
6060
return interpolate(Math.abs(scrollY.value), [0, 40], [0, 1], Extrapolate.CLAMP);
61-
}, [height]);
61+
});
6262

6363
const blurStyle = useAnimatedStyle(() => {
6464
return { opacity: blurOpacity.value };
@@ -71,11 +71,8 @@ const HeaderComponent: React.FC<ScrollHeaderProps> = ({ showNavBar, scrollY }) =
7171
[0, -AVATAR_SIZE_VALUE],
7272
Extrapolate.CLAMP
7373
);
74-
}, [scrollY]);
74+
});
7575

76-
// We use a "paddingBottom" adjustment to increase the banner's size.
77-
// Using height is causing crashes on iOS at the moment...
78-
// https://github.com/software-mansion/react-native-reanimated/issues/2285
7976
const bannerTranslationStyle = useAnimatedStyle(() => {
8077
return { transform: [{ translateY: bannerTranslation.value }] };
8178
});
@@ -93,8 +90,6 @@ const HeaderComponent: React.FC<ScrollHeaderProps> = ({ showNavBar, scrollY }) =
9390
);
9491
});
9592

96-
// Slow down the avatar's translation to allow it to scale down and
97-
// still stay at its position.
9893
const profileImageTranslationY = useDerivedValue(() => {
9994
return interpolate(
10095
profileImageScale.value,
@@ -119,6 +114,8 @@ const HeaderComponent: React.FC<ScrollHeaderProps> = ({ showNavBar, scrollY }) =
119114
};
120115
});
121116

117+
// Slow down the avatar's translation to allow it to scale down and
118+
// still stay at its position.
122119
const profileImageScaleStyle = useAnimatedStyle(() => {
123120
return {
124121
transform: [

0 commit comments

Comments
 (0)