Skip to content

Commit c9de92d

Browse files
committed
fix: remove redundant changes
1 parent 1fdd16a commit c9de92d

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

src/pages/workspace/WorkspaceOverviewPage.tsx

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import {useFocusEffect} from '@react-navigation/native';
22
import React, {useCallback, useContext, useEffect, useRef, useState} from 'react';
33
import type {ImageStyle, StyleProp} from 'react-native';
44
import {Image, StyleSheet, View} from 'react-native';
5-
import type {ValueOf} from 'type-fest';
65
import Avatar from '@components/Avatar';
76
import AvatarWithImagePicker from '@components/AvatarWithImagePicker';
87
import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu';
98
import type {DropdownOption} from '@components/ButtonWithDropdownMenu/types';
109
import ConfirmModal from '@components/ConfirmModal';
11-
import {FallbackWorkspaceAvatar, ImageCropSquareMask, QrCode, Transfer, Trashcan, UserPlus} from '@components/Icon/Expensicons';
10+
import {FallbackWorkspaceAvatar, ImageCropSquareMask, QrCode, Trashcan, UserPlus} from '@components/Icon/Expensicons';
1211
import {Building} from '@components/Icon/Illustrations';
1312
import {LockedAccountContext} from '@components/LockedAccountModalProvider';
1413
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
@@ -22,7 +21,7 @@ import usePayAndDowngrade from '@hooks/usePayAndDowngrade';
2221
import useResponsiveLayout from '@hooks/useResponsiveLayout';
2322
import useThemeIllustrations from '@hooks/useThemeIllustrations';
2423
import useThemeStyles from '@hooks/useThemeStyles';
25-
import {clearInviteDraft, clearWorkspaceOwnerChangeFlow, requestWorkspaceOwnerChange} from '@libs/actions/Policy/Member';
24+
import {clearInviteDraft} from '@libs/actions/Policy/Member';
2625
import {
2726
calculateBillNewDot,
2827
clearAvatarErrors,
@@ -221,15 +220,6 @@ function WorkspaceOverviewPage({policyDraft, policy: policyProp, route}: Workspa
221220
Navigation.popToSidebar();
222221
};
223222

224-
const startChangeOwnershipFlow = useCallback(() => {
225-
if (!policy?.id || !policy?.ownerAccountID) {
226-
return;
227-
}
228-
clearWorkspaceOwnerChangeFlow(policy.id);
229-
requestWorkspaceOwnerChange(policy.id);
230-
Navigation.navigate(ROUTES.WORKSPACE_OWNER_CHANGE_CHECK.getRoute(policy.id, policy.ownerAccountID, 'amountOwed' as ValueOf<typeof CONST.POLICY.OWNERSHIP_ERRORS>));
231-
}, [policy]);
232-
233223
const getHeaderButtons = () => {
234224
if (readOnly) {
235225
return null;
@@ -267,14 +257,6 @@ function WorkspaceOverviewPage({policyDraft, policy: policyProp, route}: Workspa
267257
shouldCloseModalOnSelect: !shouldCalculateBillNewDot(),
268258
});
269259
}
270-
if (isPolicyAdmin && !isOwner && shouldRenderTransferOwnerButton()) {
271-
secondaryActions.push({
272-
value: 'transferOwner',
273-
text: translate('workspace.people.transferOwner'),
274-
icon: Transfer,
275-
onSelected: startChangeOwnershipFlow,
276-
});
277-
}
278260
return (
279261
<View style={[!shouldUseNarrowLayout && styles.flexRow, !shouldUseNarrowLayout && styles.gap2]}>
280262
<ButtonWithDropdownMenu

0 commit comments

Comments
 (0)