From 4984b39545e49b5780602e17e4adc41f8e1678fb Mon Sep 17 00:00:00 2001 From: Pujan Date: Tue, 5 Sep 2023 02:01:16 +0530 Subject: [PATCH] minor cleanups --- src/components/DistanceRequest.js | 6 +++--- src/styles/styles.js | 2 +- src/styles/variables.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/DistanceRequest.js b/src/components/DistanceRequest.js index 759fcc02b091..68bda3936e10 100644 --- a/src/components/DistanceRequest.js +++ b/src/components/DistanceRequest.js @@ -131,8 +131,8 @@ function DistanceRequest({iou, iouType, report, transaction, mapboxAccessToken}) ); // Show up to the max number of waypoints plus 1/2 of one to hint at scrolling - const halfMenuItemHeight = Math.floor(variables.baseMenuItemHeight / 2); - const scrollContainerMaxHeight = variables.baseMenuItemHeight * MAX_WAYPOINTS_TO_DISPLAY + halfMenuItemHeight; + const halfMenuItemHeight = Math.floor(variables.optionRowHeight / 2); + const scrollContainerMaxHeight = variables.optionRowHeight * MAX_WAYPOINTS_TO_DISPLAY + halfMenuItemHeight; useEffect(() => { MapboxToken.init(); @@ -176,7 +176,7 @@ function DistanceRequest({iou, iouType, report, transaction, mapboxAccessToken}) setScrollContentHeight(height); }} onScroll={updateGradientVisibility} - scrollEventThrottle={16} + scrollEventThrottle={variables.distanceScrollEventThrottle} ref={scrollViewRef} > {_.map(waypoints, (waypoint, key) => { diff --git a/src/styles/styles.js b/src/styles/styles.js index 9d7e14a51fc1..3a41e94adb91 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -3868,7 +3868,7 @@ const styles = { distanceRequestContainer: (maxHeight) => ({ ...flex.flexShrink2, - minHeight: variables.baseMenuItemHeight * 2, + minHeight: variables.optionRowHeight * 2, maxHeight, }), diff --git a/src/styles/variables.ts b/src/styles/variables.ts index 3b6dbf47970e..eb182ab1eca0 100644 --- a/src/styles/variables.ts +++ b/src/styles/variables.ts @@ -151,7 +151,7 @@ export default { pressDimValue: 0.8, qrShareHorizontalPadding: 32, - baseMenuItemHeight: 64, - moneyRequestSkeletonHeight: 107, + + distanceScrollEventThrottle: 16, } as const;