Skip to content

Commit c2f2ebf

Browse files
authored
Merge pull request Expensify#67482 from callstack-internal/fix/67410-not-here-page-after-deleting-workspace
fix: Always navigate back from policy after deleting it
2 parents 52e28fa + b3c6f0c commit c2f2ebf

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/pages/workspace/WorkspaceOverviewPage.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,8 @@ function WorkspaceOverviewPage({policyDraft, policy: policyProp, route}: Workspa
184184

185185
deleteWorkspace(policy.id, policyName);
186186
setIsDeleteModalOpen(false);
187-
188-
if (!shouldUseNarrowLayout) {
189-
goBackFromInvalidPolicy();
190-
}
191-
}, [policy?.id, policyName, shouldUseNarrowLayout]);
187+
goBackFromInvalidPolicy();
188+
}, [policy?.id, policyName]);
192189

193190
useEffect(() => {
194191
if (isLoadingBill) {

0 commit comments

Comments
 (0)