@@ -2,13 +2,12 @@ import {useFocusEffect} from '@react-navigation/native';
22import React , { useCallback , useContext , useEffect , useRef , useState } from 'react' ;
33import type { ImageStyle , StyleProp } from 'react-native' ;
44import { Image , StyleSheet , View } from 'react-native' ;
5- import type { ValueOf } from 'type-fest' ;
65import Avatar from '@components/Avatar' ;
76import AvatarWithImagePicker from '@components/AvatarWithImagePicker' ;
87import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu' ;
98import type { DropdownOption } from '@components/ButtonWithDropdownMenu/types' ;
109import 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' ;
1211import { Building } from '@components/Icon/Illustrations' ;
1312import { LockedAccountContext } from '@components/LockedAccountModalProvider' ;
1413import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription' ;
@@ -22,7 +21,7 @@ import usePayAndDowngrade from '@hooks/usePayAndDowngrade';
2221import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
2322import useThemeIllustrations from '@hooks/useThemeIllustrations' ;
2423import useThemeStyles from '@hooks/useThemeStyles' ;
25- import { clearInviteDraft , clearWorkspaceOwnerChangeFlow , requestWorkspaceOwnerChange } from '@libs/actions/Policy/Member' ;
24+ import { clearInviteDraft } from '@libs/actions/Policy/Member' ;
2625import {
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