Skip to content

Commit

Permalink
Fix goBack when workspace with given policyID does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-solecki committed Jan 30, 2024
1 parent 9b16806 commit f8a926b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/workspace/WorkspacePageWithSections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ function WorkspacePageWithSections({
const {isSmallScreenWidth} = useWindowDimensions();
const firstRender = useRef(true);

const goBack = () => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES);
const goBack = () => {
Navigation.goBack(ROUTES.SETTINGS_WORKSPACES);

// Needed when workspace with given policyID does not exist
Navigation.navigateWithSwitchPolicyID({route: ROUTES.ALL_SETTINGS});
};

useEffect(() => {
// Because isLoading is false before merging in Onyx, we need firstRender ref to display loading page as well before isLoading is change to true
Expand Down

0 comments on commit f8a926b

Please sign in to comment.