Skip to content

Commit

Permalink
Merge pull request #48569 from Krishna2323/krishna2323/issue/48563
Browse files Browse the repository at this point in the history
fix: Import categories - Unable to dismiss 'Import successful' modal by clicking outside the modal.
  • Loading branch information
mountiny authored Sep 9, 2024
2 parents 3b6b403 + 5861e90 commit 2799b04
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/pages/workspace/categories/ImportedCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ function ImportedCategoriesPage({route}: ImportedCategoriesPageProps) {
return;
}

const closeImportPageAndModal = () => {
setIsImportingCategories(false);
closeImportPage();
Navigation.navigate(ROUTES.WORKSPACE_CATEGORIES.getRoute(policyID));
};

return (
<ScreenWrapper
testID={ImportedCategoriesPage.displayName}
Expand All @@ -135,11 +141,8 @@ function ImportedCategoriesPage({route}: ImportedCategoriesPageProps) {
isVisible={spreadsheet?.shouldFinalModalBeOpened}
title={spreadsheet?.importFinalModal?.title ?? ''}
prompt={spreadsheet?.importFinalModal?.prompt ?? ''}
onConfirm={() => {
setIsImportingCategories(false);
closeImportPage();
Navigation.navigate(ROUTES.WORKSPACE_CATEGORIES.getRoute(policyID));
}}
onConfirm={closeImportPageAndModal}
onCancel={closeImportPageAndModal}
confirmText={translate('common.buttonConfirm')}
shouldShowCancelButton={false}
/>
Expand Down

0 comments on commit 2799b04

Please sign in to comment.