From a6a92ad62a0874ebad5545c6c08f5fd50c2b0e29 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Fri, 6 Sep 2024 11:04:46 +0530 Subject: [PATCH] minor update. Signed-off-by: krishna2323 --- .../LocationPermissionModal/index.android.tsx | 10 ++++++---- src/components/LocationPermissionModal/index.tsx | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) 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')}