diff --git a/src/pages/workspace/categories/ImportedCategoriesPage.tsx b/src/pages/workspace/categories/ImportedCategoriesPage.tsx index 585e5e2833ed..a3fbe694389f 100644 --- a/src/pages/workspace/categories/ImportedCategoriesPage.tsx +++ b/src/pages/workspace/categories/ImportedCategoriesPage.tsx @@ -106,6 +106,12 @@ function ImportedCategoriesPage({route}: ImportedCategoriesPageProps) { return; } + const closeImportPageAndModal = () => { + setIsImportingCategories(false); + closeImportPage(); + Navigation.navigate(ROUTES.WORKSPACE_CATEGORIES.getRoute(policyID)); + }; + return ( { - setIsImportingCategories(false); - closeImportPage(); - Navigation.navigate(ROUTES.WORKSPACE_CATEGORIES.getRoute(policyID)); - }} + onConfirm={closeImportPageAndModal} + onCancel={closeImportPageAndModal} confirmText={translate('common.buttonConfirm')} shouldShowCancelButton={false} />