Skip to content

Commit

Permalink
minor update.
Browse files Browse the repository at this point in the history
Signed-off-by: krishna2323 <[email protected]>
  • Loading branch information
Krishna2323 committed Sep 6, 2024
1 parent 937e6c2 commit a6a92ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/components/LocationPermissionModal/index.android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe
setHasError(false);
};

const closeModal = () => {
setShowModal(false);
resetPermissionFlow();
};

return (
<ConfirmModal
isVisible={showModal}
onConfirm={grantLocationPermission}
onCancel={skipLocationPermission}
onBackdropPress={() => {
setShowModal(false);
resetPermissionFlow();
}}
onBackdropPress={closeModal}
confirmText={hasError ? translate('common.settings') : translate('common.continue')}
cancelText={translate('common.notNow')}
prompt={translate(hasError ? 'receipt.locationErrorMessage' : 'receipt.locationAccessMessage')}
Expand Down
9 changes: 5 additions & 4 deletions src/components/LocationPermissionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,16 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe
return isWeb ? translate('common.buttonConfirm') : translate('common.settings');
};

const closeModal = () => {
setShowModal(false);
resetPermissionFlow();
};
return (
<ConfirmModal
isVisible={showModal}
onConfirm={grantLocationPermission}
onCancel={skipLocationPermission}
onBackdropPress={() => {
setShowModal(false);
resetPermissionFlow();
}}
onBackdropPress={closeModal}
confirmText={getConfirmText()}
cancelText={translate('common.notNow')}
prompt={translate(hasError ? 'receipt.locationErrorMessage' : 'receipt.locationAccessMessage')}
Expand Down

0 comments on commit a6a92ad

Please sign in to comment.