Skip to content

Commit

Permalink
fix: Import categories - Unable to dismiss 'Import successful' modal …
Browse files Browse the repository at this point in the history
…by clicking outside the modal.

Signed-off-by: krishna2323 <[email protected]>
  • Loading branch information
Krishna2323 committed Sep 4, 2024
1 parent 2ef63e7 commit 5861e90
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 @@ -106,6 +106,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 @@ -130,11 +136,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 5861e90

Please sign in to comment.