Skip to content

Commit 53066d6

Browse files
authored
fix: bypass translations when disableScale is enabled (#35)
* fix: bypass translations when disableScale is enabled * fix: update typings
1 parent 1afa530 commit 53066d6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/hooks/useAnimateScrollView.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const useAnimateScrollView = (
3434
scroll,
3535
onScroll,
3636
disableScale ? 1 : scale,
37-
translateYDown,
38-
translateYUp,
37+
disableScale ? 0 : translateYDown,
38+
disableScale ? 0 : translateYUp,
3939
] as const;
4040
};

src/types.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export type AnimatedNavbarProps = {
6363

6464
export type AnimatedHeaderProps = {
6565
imageHeight: number;
66-
translateYUp: Animated.AnimatedInterpolation<string | number>;
67-
translateYDown: Animated.AnimatedInterpolation<string | number>;
66+
translateYUp: Animated.AnimatedInterpolation<string | number> | 0;
67+
translateYDown: Animated.AnimatedInterpolation<string | number> | 0;
6868
scale: Animated.AnimatedInterpolation<string | number> | 1;
6969
imageStyle?: StyleProp<ImageStyle>;
7070
HeaderComponent?: JSX.Element;

0 commit comments

Comments
 (0)