diff --git a/src/components/LocationPermissionModal/index.android.tsx b/src/components/LocationPermissionModal/index.android.tsx index 3b62f2b49aaf..30896cf37084 100644 --- a/src/components/LocationPermissionModal/index.android.tsx +++ b/src/components/LocationPermissionModal/index.android.tsx @@ -63,15 +63,17 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe setHasError(false); }; + const closeModal = () => { + setShowModal(false); + resetPermissionFlow(); + }; + return ( { - setShowModal(false); - resetPermissionFlow(); - }} + onBackdropPress={closeModal} confirmText={hasError ? translate('common.settings') : translate('common.continue')} cancelText={translate('common.notNow')} prompt={translate(hasError ? 'receipt.locationErrorMessage' : 'receipt.locationAccessMessage')} diff --git a/src/components/LocationPermissionModal/index.tsx b/src/components/LocationPermissionModal/index.tsx index 52dd16b1ee34..0e500a9b7cc4 100644 --- a/src/components/LocationPermissionModal/index.tsx +++ b/src/components/LocationPermissionModal/index.tsx @@ -77,15 +77,16 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe return isWeb ? translate('common.buttonConfirm') : translate('common.settings'); }; + const closeModal = () => { + setShowModal(false); + resetPermissionFlow(); + }; return ( { - setShowModal(false); - resetPermissionFlow(); - }} + onBackdropPress={closeModal} confirmText={getConfirmText()} cancelText={translate('common.notNow')} prompt={translate(hasError ? 'receipt.locationErrorMessage' : 'receipt.locationAccessMessage')}