From 058719676790f17347a0264222763cc913386b75 Mon Sep 17 00:00:00 2001 From: Mohsen Date: Mon, 25 Mar 2024 16:17:16 +0300 Subject: [PATCH] [#19351] fix: reviewer feedbacks --- src/js/worklets/header.js | 26 +++++++++---------- .../components/navigation/page_nav/view.cljs | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) 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