@@ -28,7 +28,6 @@ import useThemeStyles from '@hooks/useThemeStyles';
28
28
import ControlSelection from '@libs/ControlSelection' ;
29
29
import { canUseTouchScreen } from '@libs/DeviceCapabilities' ;
30
30
import { getIOUReportPreviewButtonType , getTotalAmountForIOUReportPreviewButton , IOU_REPORT_PREVIEW_BUTTON } from '@libs/MoneyRequestReportUtils' ;
31
- import type { RootNavigatorParamList , State } from '@libs/Navigation/types' ;
32
31
import { getConnectedIntegration } from '@libs/PolicyUtils' ;
33
32
import { getOriginalMessage , isActionOfType } from '@libs/ReportActionsUtils' ;
34
33
import {
@@ -64,13 +63,11 @@ import {
64
63
isWaitingForSubmissionFromCurrentUser as isWaitingForSubmissionFromCurrentUserReportUtils ,
65
64
} from '@libs/ReportUtils' ;
66
65
import { getMerchant , hasPendingUI , isCardTransaction , isPartialMerchant , isPending , shouldShowBrokenConnectionViolationForMultipleTransactions } from '@libs/TransactionUtils' ;
67
- import navigationRef from '@navigation/navigationRef' ;
68
66
import colors from '@styles/theme/colors' ;
69
67
import variables from '@styles/variables' ;
70
68
import { approveMoneyRequest , canApproveIOU , canIOUBePaid as canIOUBePaidIOUActions , canSubmitReport , payInvoice , payMoneyRequest , submitReport } from '@userActions/IOU' ;
71
69
import CONST from '@src/CONST' ;
72
70
import type { TranslationPaths } from '@src/languages/types' ;
73
- import NAVIGATORS from '@src/NAVIGATORS' ;
74
71
import ROUTES from '@src/ROUTES' ;
75
72
import type { Transaction } from '@src/types/onyx' ;
76
73
import type { PaymentMethodType } from '@src/types/onyx/OriginalMessage' ;
@@ -113,6 +110,7 @@ function MoneyRequestReportPreviewContent({
113
110
reportPreviewStyles,
114
111
shouldDisplayContextMenu = true ,
115
112
isInvoice,
113
+ shouldShowBorder = false ,
116
114
} : MoneyRequestReportPreviewContentProps ) {
117
115
const lastTransaction = transactions ?. at ( 0 ) ;
118
116
const transactionIDList = transactions ?. map ( ( reportTransaction ) => reportTransaction . transactionID ) ?? [ ] ;
@@ -122,8 +120,6 @@ function MoneyRequestReportPreviewContent({
122
120
const { translate} = useLocalize ( ) ;
123
121
const { isOffline} = useNetwork ( ) ;
124
122
const { shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
125
- const rootState = navigationRef . getRootState ( ) as State < RootNavigatorParamList > ;
126
- const isSearchFullscreen = rootState ?. routes . at ( - 1 ) ?. name === NAVIGATORS . SEARCH_FULLSCREEN_NAVIGATOR ;
127
123
128
124
const [ doesReportNameOverflow , setDoesReportNameOverflow ] = useState ( false ) ;
129
125
@@ -461,7 +457,7 @@ function MoneyRequestReportPreviewContent({
461
457
styles . flexRow ,
462
458
styles . justifyContentBetween ,
463
459
StyleUtils . getBackgroundColorStyle ( theme . cardBG ) ,
464
- isSearchFullscreen ? styles . borderedContentCardLarge : styles . reportContainerBorderRadius ,
460
+ shouldShowBorder ? styles . borderedContentCardLarge : styles . reportContainerBorderRadius ,
465
461
] }
466
462
role = { getButtonRole ( true ) }
467
463
isNested
0 commit comments