Skip to content

Commit 6569205

Browse files
authored
Merge pull request #59300 from software-mansion-labs/fix/go-back-to-sidebar-page
Fix navigating back to sidebar page in SplitNavigators
2 parents b8f6308 + d5040a3 commit 6569205

23 files changed

+111
-18
lines changed

src/libs/Navigation/AppNavigator/useSplitNavigatorScreenOptions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const useSplitNavigatorScreenOptions = () => {
5151
headerShown: false,
5252
title: CONFIG.SITE_TITLE,
5353
animation: shouldUseNarrowLayout ? undefined : Animations.NONE,
54+
animationTypeForReplace: 'pop',
5455
web: {
5556
cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true, shouldAnimateSidePanel: true}),
5657
cardStyle: shouldUseNarrowLayout ? StyleUtils.getNavigationModalCardStyle() : themeStyles.h100,

src/libs/Navigation/NavigationRoot.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,14 @@ function NavigationRoot({authenticated, lastVisitedPath, initialUrl, onReady}: N
172172
return;
173173
}
174174

175-
Navigation.setShouldPopAllStateOnUP(!shouldUseNarrowLayout);
175+
// After resizing the screen from wide to narrow, if we have visited multiple central screens, we want to go back to the LHN screen, so we set shouldPopAllStateOnUP to true.
176+
// Now when this value is true, Navigation.goBack with the option {shouldPopToTop: true} will remove all visited central screens in the given tab from the navigation stack and go back to the LHN.
177+
// More context here: https://github.com/Expensify/App/pull/59300
178+
if (!shouldUseNarrowLayout) {
179+
return;
180+
}
181+
182+
Navigation.setShouldPopAllStateOnUP(true);
176183
}, [shouldUseNarrowLayout]);
177184

178185
useEffect(() => {
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Log from '@libs/Log';
2+
import Navigation from '@libs/Navigation/Navigation';
3+
import navigationRef from '@libs/Navigation/navigationRef';
4+
import NAVIGATORS from '@src/NAVIGATORS';
5+
import ROUTES from '@src/ROUTES';
6+
7+
/**
8+
* If there are already other screens open in WorkspaceSplitNavigator, we return to the previous one.
9+
* If not, from the central screen in WorkspaceSplitNavigator we should return to the WorkspaceInitialPage.
10+
*/
11+
function goBackFromWorkspaceCentralScreen(policyID: string | undefined) {
12+
const rootState = navigationRef.getRootState();
13+
const lastRoute = rootState.routes.at(-1);
14+
15+
if (lastRoute?.name !== NAVIGATORS.WORKSPACE_SPLIT_NAVIGATOR) {
16+
Log.hmmm('[goBackFromWorkspaceCentralScreen] goBackFromWorkspaceCentralScreen was called from a different navigator than WorkspaceSplitNavigator.');
17+
return;
18+
}
19+
20+
if (lastRoute.state?.routes && lastRoute.state.routes.length > 1) {
21+
Navigation.goBack(undefined, {shouldPopToTop: true});
22+
return;
23+
}
24+
25+
Navigation.goBack(ROUTES.WORKSPACE_INITIAL.getRoute(policyID));
26+
}
27+
28+
export default goBackFromWorkspaceCentralScreen;

src/pages/TeachersUnite/SaveTheWorldPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function SaveTheWorldPage() {
5757
title={translate('sidebarScreen.saveTheWorld')}
5858
shouldShowBackButton={shouldUseNarrowLayout}
5959
shouldDisplaySearchRouter
60-
onBackButtonPress={() => Navigation.goBack()}
60+
onBackButtonPress={() => Navigation.goBack(undefined, {shouldPopToTop: true})}
6161
icon={Illustrations.TeachersUnite}
6262
shouldUseHeadlineHeader
6363
/>

src/pages/settings/AboutPage/AboutPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function AboutPage() {
142142
title={translate('initialSettingsPage.about')}
143143
shouldShowBackButton={shouldUseNarrowLayout}
144144
shouldDisplaySearchRouter
145-
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}
145+
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS, {shouldPopToTop: true})}
146146
icon={Illustrations.PalmTree}
147147
shouldUseHeadlineHeader
148148
/>

src/pages/settings/Preferences/PreferencesPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function PreferencesPage() {
5353
shouldUseHeadlineHeader
5454
shouldShowBackButton={shouldUseNarrowLayout}
5555
shouldDisplaySearchRouter
56-
onBackButtonPress={() => Navigation.goBack()}
56+
onBackButtonPress={() => Navigation.goBack(undefined, {shouldPopToTop: true})}
5757
/>
5858
<ScrollView contentContainerStyle={styles.pt3}>
5959
<View style={[styles.flex1, shouldUseNarrowLayout ? styles.workspaceSectionMobile : styles.workspaceSection]}>

src/pages/settings/Profile/ProfilePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function ProfilePage() {
152152
>
153153
<HeaderWithBackButton
154154
title={translate('common.profile')}
155-
onBackButtonPress={() => Navigation.goBack(route.params?.backTo)}
155+
onBackButtonPress={() => Navigation.goBack(route.params?.backTo, {shouldPopToTop: true})}
156156
shouldShowBackButton={shouldUseNarrowLayout}
157157
shouldDisplaySearchRouter
158158
icon={Illustrations.Profile}

src/pages/settings/Security/SecuritySettingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function SecuritySettingsPage() {
265265
<HeaderWithBackButton
266266
title={translate('initialSettingsPage.security')}
267267
shouldShowBackButton={shouldUseNarrowLayout}
268-
onBackButtonPress={() => Navigation.goBack()}
268+
onBackButtonPress={() => Navigation.goBack(undefined, {shouldPopToTop: true})}
269269
icon={Illustrations.LockClosed}
270270
shouldUseHeadlineHeader
271271
shouldDisplaySearchRouter

src/pages/settings/Subscription/SubscriptionSettingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function SubscriptionSettingsPage({route}: SubscriptionSettingsPageProps) {
5151
>
5252
<HeaderWithBackButton
5353
title={translate('workspace.common.subscription')}
54-
onBackButtonPress={() => Navigation.goBack(backTo)}
54+
onBackButtonPress={() => Navigation.goBack(backTo, {shouldPopToTop: true})}
5555
shouldShowBackButton={shouldUseNarrowLayout}
5656
shouldDisplaySearchRouter
5757
icon={Illustrations.CreditCardsNew}

src/pages/settings/Troubleshoot/TroubleshootPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function TroubleshootPage() {
108108
title={translate('initialSettingsPage.aboutPage.troubleshoot')}
109109
shouldShowBackButton={shouldUseNarrowLayout}
110110
shouldDisplaySearchRouter
111-
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}
111+
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS, {shouldPopToTop: true})}
112112
icon={Illustrations.Lightbulb}
113113
shouldUseHeadlineHeader
114114
/>

src/pages/settings/Wallet/WalletPage/WalletPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ function WalletPage({shouldListenForResize = false}: WalletPageProps) {
389389
shouldUseHeadlineHeader
390390
shouldShowBackButton={shouldUseNarrowLayout}
391391
shouldDisplaySearchRouter
392+
onBackButtonPress={() => Navigation.goBack(undefined, {shouldPopToTop: true})}
392393
/>
393394
);
394395

src/pages/workspace/WorkspaceMembersPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import {removeApprovalWorkflow as removeApprovalWorkflowAction, updateApprovalWo
4646
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
4747
import {formatPhoneNumber as formatPhoneNumberUtil} from '@libs/LocalePhoneNumber';
4848
import Log from '@libs/Log';
49+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
4950
import Navigation from '@libs/Navigation/Navigation';
5051
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
5152
import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types';
@@ -680,7 +681,7 @@ function WorkspaceMembersPage({personalDetails, route, policy, currentUserPerson
680681
turnOffMobileSelectionMode();
681682
return;
682683
}
683-
Navigation.goBack();
684+
goBackFromWorkspaceCentralScreen(policyID);
684685
}}
685686
>
686687
{() => (

src/pages/workspace/WorkspaceMoreFeaturesPage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import useStyleUtils from '@hooks/useStyleUtils';
1515
import useThemeStyles from '@hooks/useThemeStyles';
1616
import {filterInactiveCards, getAllCardsForWorkspace, getCompanyFeeds, isSmartLimitEnabled as isSmartLimitEnabledUtil} from '@libs/CardUtils';
1717
import {getLatestErrorField} from '@libs/ErrorUtils';
18+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
1819
import Navigation from '@libs/Navigation/Navigation';
1920
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
2021
import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types';
@@ -465,6 +466,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro
465466
shouldUseHeadlineHeader
466467
title={translate('workspace.common.moreFeatures')}
467468
shouldShowBackButton={shouldUseNarrowLayout}
469+
onBackButtonPress={() => goBackFromWorkspaceCentralScreen(policyID)}
468470
/>
469471

470472
<ScrollView>

src/pages/workspace/WorkspaceOverviewPage.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
} from '@libs/actions/Policy/Policy';
3232
import {filterInactiveCards} from '@libs/CardUtils';
3333
import {getLatestErrorField} from '@libs/ErrorUtils';
34+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
3435
import resetPolicyIDInNavigationState from '@libs/Navigation/helpers/resetPolicyIDInNavigationState';
3536
import Navigation from '@libs/Navigation/Navigation';
3637
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
@@ -189,7 +190,14 @@ function WorkspaceOverviewPage({policyDraft, policy: policyProp, route}: Workspa
189190
shouldShowNonAdmin
190191
icon={Illustrations.Building}
191192
shouldShowNotFoundPage={policy === undefined}
192-
onBackButtonPress={() => Navigation.goBack(backTo)}
193+
onBackButtonPress={() => {
194+
if (backTo) {
195+
Navigation.goBack(backTo);
196+
return;
197+
}
198+
199+
goBackFromWorkspaceCentralScreen(policy?.id);
200+
}}
193201
>
194202
{(hasVBA?: boolean) => (
195203
<View style={[styles.flex1, styles.mt3, shouldUseNarrowLayout ? styles.workspaceSectionMobile : styles.workspaceSection]}>

src/pages/workspace/WorkspacePageWithSections.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout';
1717
import useThemeStyles from '@hooks/useThemeStyles';
1818
import {openWorkspaceView} from '@libs/actions/BankAccounts';
1919
import BankAccount from '@libs/models/BankAccount';
20+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
2021
import Navigation from '@libs/Navigation/Navigation';
2122
import {isPendingDeletePolicy, isPolicyAdmin, shouldShowPolicy as shouldShowPolicyUtil} from '@libs/PolicyUtils';
2223
import CONST from '@src/CONST';
@@ -164,6 +165,20 @@ function WorkspacePageWithSections({
164165
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
165166
}, [policy, shouldShowNonAdmin, shouldShowPolicy]);
166167

168+
const handleOnBackButtonPress = () => {
169+
if (onBackButtonPress) {
170+
onBackButtonPress();
171+
return;
172+
}
173+
174+
if (backButtonRoute) {
175+
Navigation.goBack(backButtonRoute);
176+
return;
177+
}
178+
179+
goBackFromWorkspaceCentralScreen(policyID);
180+
};
181+
167182
return (
168183
<ScreenWrapper
169184
includeSafeAreaPaddingBottom={includeSafeAreaPaddingBottom}
@@ -182,7 +197,7 @@ function WorkspacePageWithSections({
182197
>
183198
<HeaderWithBackButton
184199
title={headerText}
185-
onBackButtonPress={() => (onBackButtonPress ? onBackButtonPress() : Navigation.goBack(backButtonRoute))}
200+
onBackButtonPress={handleOnBackButtonPress}
186201
shouldShowBackButton={shouldUseNarrowLayout || shouldShowBackButton}
187202
icon={icon ?? undefined}
188203
style={styles.headerBarDesktopHeight(canUseLeftHandBar)}

src/pages/workspace/accounting/PolicyAccountingPage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {isAuthenticationError, isConnectionInProgress, isConnectionUnverified, r
3232
import {shouldShowQBOReimbursableExportDestinationAccountError} from '@libs/actions/connections/QuickbooksOnline';
3333
import {getAssignedSupportData} from '@libs/actions/Policy/Policy';
3434
import {isExpensifyCardFullySetUp} from '@libs/CardUtils';
35+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
3536
import {
3637
areSettingsInErrorFields,
3738
findCurrentXeroOrganization,
@@ -534,6 +535,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
534535
icon={Illustrations.Accounting}
535536
shouldUseHeadlineHeader
536537
threeDotsAnchorPosition={threeDotsAnchorPosition}
538+
onBackButtonPress={() => goBackFromWorkspaceCentralScreen(policyID)}
537539
/>
538540
<ScrollView contentContainerStyle={styles.pt3}>
539541
<View style={[styles.flex1, shouldUseNarrowLayout ? styles.workspaceSectionMobile : styles.workspaceSection]}>

src/pages/workspace/categories/WorkspaceCategoriesPage.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {isConnectionInProgress} from '@libs/actions/connections';
3939
import {turnOffMobileSelectionMode} from '@libs/actions/MobileSelectionMode';
4040
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
4141
import localeCompare from '@libs/LocaleCompare';
42+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
4243
import Navigation from '@libs/Navigation/Navigation';
4344
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
4445
import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types';
@@ -419,7 +420,13 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) {
419420
turnOffMobileSelectionMode();
420421
return;
421422
}
422-
Navigation.goBack(backTo);
423+
424+
if (backTo) {
425+
Navigation.goBack(backTo);
426+
return;
427+
}
428+
429+
goBackFromWorkspaceCentralScreen(policyId);
423430
}}
424431
shouldShowThreeDotsButton
425432
style={styles.headerBarDesktopHeight(canUseLeftHandBar)}

src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
} from '@libs/actions/Policy/DistanceRate';
3333
import {convertAmountToDisplayString} from '@libs/CurrencyUtils';
3434
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
35+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
3536
import Navigation from '@libs/Navigation/Navigation';
3637
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
3738
import {getDistanceRateCustomUnit} from '@libs/PolicyUtils';
@@ -356,7 +357,7 @@ function PolicyDistanceRatesPage({
356357
turnOffMobileSelectionMode();
357358
return;
358359
}
359-
Navigation.goBack();
360+
goBackFromWorkspaceCentralScreen(policyID);
360361
}}
361362
>
362363
{!shouldUseNarrowLayout && headerButtons}

src/pages/workspace/expensifyCard/WorkspaceCardSettingsPage.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import useLocalize from '@hooks/useLocalize';
1111
import useThemeStyles from '@hooks/useThemeStyles';
1212
import useWorkspaceAccountID from '@hooks/useWorkspaceAccountID';
1313
import {getLastFourDigits} from '@libs/BankAccountUtils';
14+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
1415
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
1516
import Navigation from '@navigation/Navigation';
1617
import type {SettingsNavigatorParamList} from '@navigation/types';
@@ -48,7 +49,10 @@ function WorkspaceCardSettingsPage({route}: WorkspaceCardSettingsPageProps) {
4849
includeSafeAreaPaddingBottom={false}
4950
shouldEnableMaxHeight
5051
>
51-
<HeaderWithBackButton title={translate('workspace.common.settings')} />
52+
<HeaderWithBackButton
53+
title={translate('workspace.common.settings')}
54+
onBackButtonPress={() => goBackFromWorkspaceCentralScreen(policyID)}
55+
/>
5256
<ScrollView contentContainerStyle={styles.flexGrow1}>
5357
<View>
5458
<OfflineWithFeedback errorRowStyles={styles.mh5}>

src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import useThreeDotsAnchorPosition from '@hooks/useThreeDotsAnchorPosition';
3434
import {convertAmountToDisplayString} from '@libs/CurrencyUtils';
3535
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
3636
import localeCompare from '@libs/LocaleCompare';
37+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
3738
import Navigation from '@libs/Navigation/Navigation';
3839
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
3940
import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types';
@@ -382,7 +383,13 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) {
382383
turnOffMobileSelectionMode();
383384
return;
384385
}
385-
Navigation.goBack(backTo);
386+
387+
if (backTo) {
388+
Navigation.goBack(backTo);
389+
return;
390+
}
391+
392+
goBackFromWorkspaceCentralScreen(policyID);
386393
}}
387394
shouldShowThreeDotsButton
388395
threeDotsMenuItems={threeDotsMenuItems}

src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {isConnectionInProgress} from '@libs/actions/connections';
3535
import {turnOffMobileSelectionMode} from '@libs/actions/MobileSelectionMode';
3636
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
3737
import localeCompare from '@libs/LocaleCompare';
38+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
3839
import Navigation from '@libs/Navigation/Navigation';
3940
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
4041
import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types';
@@ -255,7 +256,7 @@ function WorkspaceReportFieldsPage({
255256
turnOffMobileSelectionMode();
256257
return;
257258
}
258-
Navigation.goBack();
259+
goBackFromWorkspaceCentralScreen(policyID);
259260
}}
260261
>
261262
{!shouldUseNarrowLayout && !hasReportAccountingConnections && getHeaderButtons()}

src/pages/workspace/tags/WorkspaceTagsPage.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {turnOffMobileSelectionMode} from '@libs/actions/MobileSelectionMode';
3838
import {clearPolicyTagErrors, deletePolicyTags, downloadTagsCSV, openPolicyTagsPage, setPolicyTagsRequired, setWorkspaceTagEnabled} from '@libs/actions/Policy/Tag';
3939
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
4040
import localeCompare from '@libs/LocaleCompare';
41+
import goBackFromWorkspaceCentralScreen from '@libs/Navigation/helpers/goBackFromWorkspaceCentralScreen';
4142
import Navigation from '@libs/Navigation/Navigation';
4243
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
4344
import type {WorkspaceSplitNavigatorParamList} from '@libs/Navigation/types';
@@ -451,7 +452,13 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
451452
turnOffMobileSelectionMode();
452453
return;
453454
}
454-
Navigation.goBack(backTo);
455+
456+
if (backTo) {
457+
Navigation.goBack(backTo);
458+
return;
459+
}
460+
461+
goBackFromWorkspaceCentralScreen(policyID);
455462
}}
456463
shouldShowThreeDotsButton={!policy?.hasMultipleTagLists}
457464
threeDotsMenuItems={threeDotsMenuItems}

0 commit comments

Comments
 (0)