Skip to content

Commit

Permalink
minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Pujan92 committed Sep 4, 2023
1 parent 80b57e6 commit 4984b39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/DistanceRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3868,7 +3868,7 @@ const styles = {

distanceRequestContainer: (maxHeight) => ({
...flex.flexShrink2,
minHeight: variables.baseMenuItemHeight * 2,
minHeight: variables.optionRowHeight * 2,
maxHeight,
}),

Expand Down
4 changes: 2 additions & 2 deletions src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default {
pressDimValue: 0.8,
qrShareHorizontalPadding: 32,

baseMenuItemHeight: 64,

moneyRequestSkeletonHeight: 107,

distanceScrollEventThrottle: 16,
} as const;

0 comments on commit 4984b39

Please sign in to comment.