Skip to content

Commit

Permalink
[#19351] fix: reviewer feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri committed Apr 3, 2024
1 parent dabd7a2 commit 0587196
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions src/js/worklets/header.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {useDerivedValue, withTiming} from "react-native-reanimated";
import { useDerivedValue, withTiming } from 'react-native-reanimated';

export function headerContentOpacity(scrollY, threshold) {
return useDerivedValue(function () {
'worklet';
if (scrollY.value < threshold) {
return withTiming(0);
} else {
return withTiming(1);
}
});
return useDerivedValue(function () {
'worklet';
if (scrollY.value < threshold) {
return withTiming(0);
} else {
return withTiming(1);
}
});
}

export function headerContentPosition(scrollY, threshold, topBarHeight) {
return useDerivedValue(function () {
'worklet';
return scrollY.value < threshold ? withTiming(topBarHeight) : withTiming(0);
});
return useDerivedValue(function () {
'worklet';
return scrollY.value < threshold ? withTiming(topBarHeight) : withTiming(0);
});
}
2 changes: 1 addition & 1 deletion src/quo/components/navigation/page_nav/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
opacity-animation (when scroll-y
(header-worklet/header-content-opacity scroll-y threshold))]
[reanimated/view
{:style (style/center-content-container-animation {:has-animations? (not (nil? scroll-y))
{:style (style/center-content-container-animation {:has-animations? (some? scroll-y)
:centered? centered?
:center-opacity center-opacity
:translate-animation translate-animation
Expand Down

0 comments on commit 0587196

Please sign in to comment.