diff --git a/src/js/worklets/header.js b/src/js/worklets/header.js index 558952633f90..89102b911531 100644 --- a/src/js/worklets/header.js +++ b/src/js/worklets/header.js @@ -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); + }); } diff --git a/src/quo/components/navigation/page_nav/view.cljs b/src/quo/components/navigation/page_nav/view.cljs index 6760189fbe53..c07c9d7b18e9 100644 --- a/src/quo/components/navigation/page_nav/view.cljs +++ b/src/quo/components/navigation/page_nav/view.cljs @@ -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