Skip to content

Commit

Permalink
Merge pull request #1457 from msalcala11/fix-ios-top-padding
Browse files Browse the repository at this point in the history
Fix: excessive top padding for global select component on iOS
  • Loading branch information
JohnathanWhite authored Nov 12, 2024
2 parents 6af2e48 + 6a7e6f2 commit 39dc8b7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
4 changes: 1 addition & 3 deletions src/navigation/coinbase/screens/CoinbaseAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ const CoinbaseAccount = ({
route,
}: NativeStackScreenProps<CoinbaseGroupParamList, 'CoinbaseAccount'>) => {
const {t} = useTranslation();
const insets = useSafeAreaInsets();
const theme = useTheme();
const dispatch = useAppDispatch();
const navigation = useNavigation();
Expand Down Expand Up @@ -769,8 +768,7 @@ const CoinbaseAccount = ({
isVisible={walletModalVisible}
onBackdropPress={() => onDismiss()}
fullscreen>
<GlobalSelectContainer
style={Platform.OS === 'ios' ? {paddingTop: insets.top} : {}}>
<GlobalSelectContainer>
<GlobalSelect
route={route}
navigation={navigation}
Expand Down
4 changes: 1 addition & 3 deletions src/navigation/services/buy-crypto/screens/BuyCryptoRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ const BuyCryptoRoot = ({
}: NativeStackScreenProps<BuyCryptoGroupParamList, BuyCryptoScreens.ROOT>) => {
const {t} = useTranslation();
const dispatch = useAppDispatch();
const insets = useSafeAreaInsets();
const theme = useTheme();
const logger = useLogger();
const allKeys = useAppSelector(({WALLET}: RootState) => WALLET.keys);
Expand Down Expand Up @@ -1050,8 +1049,7 @@ const BuyCryptoRoot = ({
isVisible={walletSelectorModalVisible}
onBackdropPress={() => onDismiss()}
fullscreen>
<GlobalSelectContainer
style={Platform.OS === 'ios' ? {paddingTop: insets.top} : {}}>
<GlobalSelectContainer>
<GlobalSelect
route={route}
navigation={navigation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const FromWalletSelectorModal: React.FC<FromWalletSelectorModalProps> = ({
route,
}) => {
const {t} = useTranslation();
const insets = useSafeAreaInsets();
const [swapCryptoHelpVisible, setSwapCryptoHelpVisible] = useState(false);

const _customSupportedCurrencies = customSupportedCurrencies?.map(
Expand All @@ -82,8 +81,7 @@ const FromWalletSelectorModal: React.FC<FromWalletSelectorModalProps> = ({
isVisible={isVisible}
onBackdropPress={() => onDismiss(undefined)}
fullscreen>
<GlobalSelectContainer
style={Platform.OS === 'ios' ? {paddingTop: insets.top} : {}}>
<GlobalSelectContainer>
<GlobalSelect
route={route}
navigation={navigation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ const SwapCryptoRoot: React.FC = () => {
const navigation = useNavigation();
const dispatch = useAppDispatch();
const logger = useLogger();
const insets = useSafeAreaInsets();
const keys = useAppSelector(({WALLET}) => WALLET.keys);
const locationData = useAppSelector(({LOCATION}) => LOCATION.locationData);
const network = useAppSelector(({APP}) => APP.network);
Expand Down Expand Up @@ -1802,8 +1801,7 @@ const SwapCryptoRoot: React.FC = () => {
isVisible={toWalletSelectorModalVisible}
onBackdropPress={() => onDismiss()}
fullscreen>
<GlobalSelectContainer
style={Platform.OS === 'ios' ? {paddingTop: insets.top} : {}}>
<GlobalSelectContainer>
<GlobalSelect
route={route}
navigation={navigation}
Expand Down
4 changes: 1 addition & 3 deletions src/navigation/wallet/screens/PaperWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ const PaperWallet: React.FC<PaperWalletProps> = ({navigation, route}) => {
const dispatch = useAppDispatch();
const theme = useTheme();
const logger = useLogger();
const insets = useSafeAreaInsets();
const keys = useAppSelector(({WALLET}) => WALLET.keys);
const [buttonState, setButtonState] = useState<ButtonState>();
const [balances, setBalances] = useState<
Expand Down Expand Up @@ -618,8 +617,7 @@ const PaperWallet: React.FC<PaperWalletProps> = ({navigation, route}) => {
isVisible={walletSelectorVisible}
onBackdropPress={() => onDismiss(undefined)}
fullscreen>
<GlobalSelectContainer
style={Platform.OS === 'ios' ? {paddingTop: insets.top} : {}}>
<GlobalSelectContainer>
<GlobalSelect
route={route}
navigation={navigation}
Expand Down

0 comments on commit 39dc8b7

Please sign in to comment.