Skip to content

Commit

Permalink
fix: Move ShmoTesting out of MapView (#4720)
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-at-atb committed Sep 20, 2024
1 parent 3f6bd01 commit 12fe088
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/components/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,6 @@ export const Map = (props: MapProps) => {
/>
)}

{showShmoTesting && (
<ShmoTesting selectedVehicleId={selectedFeature?.properties?.id} />
)}

{mapLines && <MapRoute lines={mapLines} />}
<LocationPuck puckBearing="heading" puckBearingEnabled={true} />
{props.selectionMode === 'ExploreLocation' && selectedCoordinates && (
Expand Down Expand Up @@ -297,7 +293,9 @@ export const Map = (props: MapProps) => {
}}
/>
</View>

{showShmoTesting && (
<ShmoTesting selectedVehicleId={selectedFeature?.properties?.id} />
)}
{includeSnackbar && <Snackbar {...snackbarProps} />}
</View>
</View>
Expand Down
4 changes: 3 additions & 1 deletion src/components/map/components/mobility/ShmoTesting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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 =
Expand Down Expand Up @@ -197,7 +199,7 @@ export const ShmoTesting = ({selectedVehicleId}: ShmoTestingProps) => {
position: 'absolute',
left: 0,
width: '50%',
paddingTop: 50,
paddingTop: safeAreaTop,
}}
>
<ScrollView
Expand Down

0 comments on commit 12fe088

Please sign in to comment.