From 12fe088d05492b7a30246dbcb2cba36850a41ad0 Mon Sep 17 00:00:00 2001 From: marius-at-atb <134292729+marius-at-atb@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:26:58 +0200 Subject: [PATCH] fix: Move ShmoTesting out of MapView (#4720) --- src/components/map/Map.tsx | 8 +++----- src/components/map/components/mobility/ShmoTesting.tsx | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/map/Map.tsx b/src/components/map/Map.tsx index 54b1292a4..bc543e532 100644 --- a/src/components/map/Map.tsx +++ b/src/components/map/Map.tsx @@ -238,10 +238,6 @@ export const Map = (props: MapProps) => { /> )} - {showShmoTesting && ( - - )} - {mapLines && } {props.selectionMode === 'ExploreLocation' && selectedCoordinates && ( @@ -297,7 +293,9 @@ export const Map = (props: MapProps) => { }} /> - + {showShmoTesting && ( + + )} {includeSnackbar && } diff --git a/src/components/map/components/mobility/ShmoTesting.tsx b/src/components/map/components/mobility/ShmoTesting.tsx index 8ca7bf823..145fec809 100644 --- a/src/components/map/components/mobility/ShmoTesting.tsx +++ b/src/components/map/components/mobility/ShmoTesting.tsx @@ -16,6 +16,7 @@ import {useCallback, useState} from 'react'; import {useWindowDimensions, View} from 'react-native'; import {Button} from '@atb/components/button'; import {ScrollView} from 'react-native-gesture-handler'; +import {useSafeAreaInsets} from 'react-native-safe-area-context'; type ShmoTestingProps = {selectedVehicleId?: string}; @@ -25,6 +26,7 @@ export const ShmoTesting = ({selectedVehicleId}: ShmoTestingProps) => { const styles = useStyles(); const {height: windowHeight} = useWindowDimensions(); + const {top: safeAreaTop} = useSafeAreaInsets(); const {recurringPaymentMethods} = usePreviousPaymentMethods(); const lastRecurringPaymentMethod = @@ -197,7 +199,7 @@ export const ShmoTesting = ({selectedVehicleId}: ShmoTestingProps) => { position: 'absolute', left: 0, width: '50%', - paddingTop: 50, + paddingTop: safeAreaTop, }} >