Skip to content

Commit

Permalink
Merge pull request #51 from software-mansion-labs/@filip-solecki/fix-…
Browse files Browse the repository at this point in the history
…goBack-workspacePageWithSections

Fix goBack when workspace with given policyID does not exist
  • Loading branch information
filip-solecki authored Jan 30, 2024
2 parents 9b16806 + f8a926b commit 0010e02
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 0010e02

Please sign in to comment.