Skip to content

Commit 3df3c26

Browse files
authored
Merge pull request Expensify#71181 from callstack-internal/remove-beta-for-duplicate-workspace
[No QA]: Remove duplicate workspace beta flag
2 parents 5c0eac3 + 6543483 commit 3df3c26

4 files changed

Lines changed: 1 addition & 14 deletions

File tree

src/CONST/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,6 @@ const CONST = {
707707
MANUAL_DISTANCE: 'manualDistance',
708708
NO_OPTIMISTIC_TRANSACTION_THREADS: 'noOptimisticTransactionThreads',
709709
UBER_FOR_BUSINESS: 'uberForBusiness',
710-
DUPLICATE_WORKSPACE: 'duplicatePolicyNewDot',
711710
},
712711
BUTTON_STATES: {
713712
DEFAULT: 'default',

src/pages/workspace/WorkspacesListPage.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import useLocalize from '@hooks/useLocalize';
3030
import useNetwork from '@hooks/useNetwork';
3131
import useOnyx from '@hooks/useOnyx';
3232
import usePayAndDowngrade from '@hooks/usePayAndDowngrade';
33-
import usePermissions from '@hooks/usePermissions';
3433
import useResponsiveLayout from '@hooks/useResponsiveLayout';
3534
import useSearchResults from '@hooks/useSearchResults';
3635
import useStyleUtils from '@hooks/useStyleUtils';
@@ -105,7 +104,6 @@ function WorkspacesListPage() {
105104
const {isOffline} = useNetwork();
106105
const isFocused = useIsFocused();
107106
const {shouldUseNarrowLayout, isMediumScreenWidth} = useResponsiveLayout();
108-
const {isBetaEnabled} = usePermissions();
109107
const [allConnectionSyncProgresses] = useOnyx(ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS, {canBeMissing: true});
110108
const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true});
111109
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: true});
@@ -117,7 +115,6 @@ function WorkspacesListPage() {
117115
const route = useRoute<PlatformStackRouteProp<AuthScreensParamList, typeof SCREENS.WORKSPACES_LIST>>();
118116
const [fundList] = useOnyx(ONYXKEYS.FUND_LIST, {canBeMissing: true});
119117
const [duplicateWorkspace] = useOnyx(ONYXKEYS.DUPLICATE_WORKSPACE, {canBeMissing: false});
120-
const isDuplicatedWorkspaceEnabled = isBetaEnabled(CONST.BETAS.DUPLICATE_WORKSPACE);
121118
const [myDomainSecurityGroups] = useOnyx(ONYXKEYS.MY_DOMAIN_SECURITY_GROUPS, {canBeMissing: true});
122119
const [securityGroups] = useOnyx(ONYXKEYS.COLLECTION.SECURITY_GROUP, {canBeMissing: true});
123120

@@ -240,7 +237,7 @@ function WorkspacesListPage() {
240237
});
241238
}
242239

243-
if (isAdmin && isDuplicatedWorkspaceEnabled) {
240+
if (isAdmin) {
244241
threeDotsMenuItems.push({
245242
icon: Expensicons.Copy,
246243
text: translate('workspace.common.duplicateWorkspace'),
@@ -347,7 +344,6 @@ function WorkspacesListPage() {
347344
duplicateWorkspace?.policyID,
348345
translate,
349346
policies,
350-
isDuplicatedWorkspaceEnabled,
351347
canUserSetWorkspaceAsDefault,
352348
fundList,
353349
styles.mb2,

src/pages/workspace/duplicate/WorkspaceDuplicatePage.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {useRoute} from '@react-navigation/native';
22
import React, {useEffect} from 'react';
33
import ScreenWrapper from '@components/ScreenWrapper';
4-
import usePermissions from '@hooks/usePermissions';
54
import type {PlatformStackRouteProp} from '@navigation/PlatformStackNavigation/types';
65
import type {WorkspaceDuplicateNavigatorParamList} from '@navigation/types';
76
import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
@@ -13,16 +12,13 @@ import WorkspaceDuplicateForm from './WorkspaceDuplicateForm';
1312
function WorkspaceDuplicatePage() {
1413
const route = useRoute<PlatformStackRouteProp<WorkspaceDuplicateNavigatorParamList, typeof SCREENS.WORKSPACE_DUPLICATE.ROOT>>();
1514
const policyID = route?.params?.policyID;
16-
const {isBetaEnabled} = usePermissions();
17-
const isDuplicatedWorkspaceEnabled = isBetaEnabled(CONST.BETAS.DUPLICATE_WORKSPACE);
1815

1916
useEffect(clearDuplicateWorkspace, []);
2017

2118
return (
2219
<AccessOrNotFoundWrapper
2320
policyID={policyID}
2421
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]}
25-
shouldBeBlocked={!isDuplicatedWorkspaceEnabled}
2622
>
2723
<ScreenWrapper
2824
enableEdgeToEdgeBottomSafeAreaPadding

src/pages/workspace/duplicate/WorkspaceDuplicateSelectFeaturesPage.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {useRoute} from '@react-navigation/native';
22
import React from 'react';
33
import ScreenWrapper from '@components/ScreenWrapper';
4-
import usePermissions from '@hooks/usePermissions';
54
import type {PlatformStackRouteProp} from '@navigation/PlatformStackNavigation/types';
65
import type {WorkspaceDuplicateNavigatorParamList} from '@navigation/types';
76
import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
@@ -12,14 +11,11 @@ import WorkspaceDuplicateSelectFeaturesForm from './WorkspaceDuplicateSelectFeat
1211
function WorkspaceDuplicateSelectFeaturesPage() {
1312
const route = useRoute<PlatformStackRouteProp<WorkspaceDuplicateNavigatorParamList, typeof SCREENS.WORKSPACE_DUPLICATE.SELECT_FEATURES>>();
1413
const policyID = route?.params?.policyID;
15-
const {isBetaEnabled} = usePermissions();
16-
const isDuplicatedWorkspaceEnabled = isBetaEnabled(CONST.BETAS.DUPLICATE_WORKSPACE);
1714

1815
return (
1916
<AccessOrNotFoundWrapper
2017
policyID={policyID}
2118
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]}
22-
shouldBeBlocked={!isDuplicatedWorkspaceEnabled}
2319
>
2420
<ScreenWrapper
2521
enableEdgeToEdgeBottomSafeAreaPadding

0 commit comments

Comments
 (0)