@@ -2,15 +2,13 @@ import {delegateEmailSelector, isUserValidatedSelector} from '@selectors/Account
22import { hasSeenTourSelector } from '@selectors/Onboarding' ;
33import truncate from 'lodash/truncate' ;
44import React , { useContext , useEffect } from 'react' ;
5- import { InteractionManager , View } from 'react-native' ;
5+ import { InteractionManager } from 'react-native' ;
66import type { ValueOf } from 'type-fest' ;
7- import Button from '@components/Button' ;
87import type { ButtonWithDropdownMenuRef } from '@components/ButtonWithDropdownMenu/types' ;
98import { useDelegateNoAccessActions , useDelegateNoAccessState } from '@components/DelegateNoAccessModalProvider' ;
109import { KYCWallContext } from '@components/KYCWall/KYCWallContext' ;
1110import MoneyReportHeaderKYCDropdown from '@components/MoneyReportHeaderKYCDropdown' ;
1211import { useMoneyReportHeaderModals } from '@components/MoneyReportHeaderModalsContext' ;
13- import NavigationDeferredMount from '@components/NavigationDeferredMount' ;
1412import { usePaymentAnimationsContext } from '@components/PaymentAnimationsContext' ;
1513import type { PopoverMenuItem } from '@components/PopoverMenu' ;
1614import { useSearchStateContext } from '@components/Search/SearchContext' ;
@@ -32,10 +30,7 @@ import usePaymentOptions from '@hooks/usePaymentOptions';
3230import usePermissions from '@hooks/usePermissions' ;
3331import usePolicy from '@hooks/usePolicy' ;
3432import useReportIsArchived from '@hooks/useReportIsArchived' ;
35- import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
3633import useSearchShouldCalculateTotals from '@hooks/useSearchShouldCalculateTotals' ;
37- import useStyleUtils from '@hooks/useStyleUtils' ;
38- import useThemeStyles from '@hooks/useThemeStyles' ;
3934import useTransactionsAndViolationsForReport from '@hooks/useTransactionsAndViolationsForReport' ;
4035import { generateDefaultWorkspaceName } from '@libs/actions/Policy/Policy' ;
4136import { search } from '@libs/actions/Search' ;
@@ -399,40 +394,15 @@ function MoneyReportHeaderSecondaryActionsInner({reportID, primaryAction, isRepo
399394 ) ;
400395}
401396
402- function MoneyReportHeaderSecondaryActionsPlaceholder ( { primaryAction} : { primaryAction : ValueOf < typeof CONST . REPORT . PRIMARY_ACTIONS > | '' } ) {
403- const styles = useThemeStyles ( ) ;
404- const StyleUtils = useStyleUtils ( ) ;
405- const { translate} = useLocalize ( ) ;
406- const { shouldUseNarrowLayout, isMediumScreenWidth} = useResponsiveLayout ( ) ;
407- const icons = useMemoizedLazyExpensifyIcons ( [ 'DownArrow' ] ) ;
408- const shouldDisplayNarrowVersion = shouldUseNarrowLayout || isMediumScreenWidth ;
409- const wrapperStyle = shouldDisplayNarrowVersion && ! primaryAction ? styles . flex1 : undefined ;
410- // Match the inner styles the real ButtonWithDropdownMenu applies when isSplitButton=false so text placement stays put on swap.
411- const innerStyles = [ StyleUtils . getDropDownButtonHeight ( CONST . DROPDOWN_BUTTON_SIZE . MEDIUM ) , styles . dropDownButtonCartIconView ] ;
412- return (
413- < View style = { wrapperStyle } >
414- < Button
415- text = { translate ( 'common.more' ) }
416- iconRight = { icons . DownArrow }
417- shouldShowRightIcon
418- innerStyles = { innerStyles }
419- onPress = { ( ) => { } }
420- />
421- </ View >
422- ) ;
423- }
424-
425397function MoneyReportHeaderSecondaryActions ( { reportID, primaryAction, isReportInSearch, backTo, dropdownMenuRef} : MoneyReportHeaderSecondaryActionsProps ) {
426398 return (
427- < NavigationDeferredMount placeholder = { < MoneyReportHeaderSecondaryActionsPlaceholder primaryAction = { primaryAction } /> } >
428399 < MoneyReportHeaderSecondaryActionsInner
429400 reportID = { reportID }
430401 primaryAction = { primaryAction }
431402 isReportInSearch = { isReportInSearch }
432403 backTo = { backTo }
433404 dropdownMenuRef = { dropdownMenuRef }
434405 />
435- </ NavigationDeferredMount >
436406 ) ;
437407}
438408
0 commit comments