@@ -10,6 +10,7 @@ import ConfirmModal from '@components/ConfirmModal';
1010import DisplayNames from '@components/DisplayNames' ;
1111import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
1212import MentionReportContext from '@components/HTMLEngineProvider/HTMLRenderers/MentionReportRenderer/MentionReportContext' ;
13+ import * as Expensicons from '@components/Icon/Expensicons' ;
1314import MenuItem from '@components/MenuItem' ;
1415import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription' ;
1516import OfflineWithFeedback from '@components/OfflineWithFeedback' ;
@@ -28,7 +29,6 @@ import useDeleteTransactions from '@hooks/useDeleteTransactions';
2829import useDuplicateTransactionsAndViolations from '@hooks/useDuplicateTransactionsAndViolations' ;
2930import useGetIOUReportFromReportAction from '@hooks/useGetIOUReportFromReportAction' ;
3031import useHasOutstandingChildTask from '@hooks/useHasOutstandingChildTask' ;
31- import { useMemoizedLazyExpensifyIcons } from '@hooks/useLazyAsset' ;
3232import useLocalize from '@hooks/useLocalize' ;
3333import useNetwork from '@hooks/useNetwork' ;
3434import useOnyx from '@hooks/useOnyx' ;
@@ -173,7 +173,6 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
173173 const transactionThreadReportID = useMemo ( ( ) => getOneTransactionThreadReportID ( report , chatReport , reportActions ?? [ ] , isOffline ) , [ reportActions , isOffline , report , chatReport ] ) ;
174174 // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
175175 const { isSmallScreenWidth} = useResponsiveLayout ( ) ;
176- const expensifyIcons = useMemoizedLazyExpensifyIcons ( [ 'Users' , 'Gear' , 'Send' , 'Folder' , 'UserPlus' , 'Pencil' , 'Checkmark' , 'Building' , 'Exit' , 'Bug' , 'Camera' , 'Trashcan' ] as const ) ;
177176
178177 /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
179178 const [ transactionThreadReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ transactionThreadReportID } ` , { canBeMissing : true } ) ;
@@ -324,15 +323,6 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
324323 } , [ report ?. reportID , isOffline , isPrivateNotesFetchTriggered , isSelfDM ] ) ;
325324
326325 const leaveChat = useCallback ( ( ) => {
327- if ( isChatThread && report . parentReportID ) {
328- Navigation . dismissModalWithReport ( { reportID : report . parentReportID } ) ;
329- Navigation . isNavigationReady ( ) . then ( ( ) => {
330- const isWorkspaceMemberLeavingWorkspaceRoom = isWorkspaceMemberLeavingWorkspaceRoomUtil ( report , isPolicyEmployee , isPolicyAdmin ) ;
331- leaveRoom ( report . reportID , isWorkspaceMemberLeavingWorkspaceRoom ) ;
332- } ) ;
333- return ;
334- }
335-
336326 Navigation . dismissModal ( ) ;
337327 Navigation . isNavigationReady ( ) . then ( ( ) => {
338328 if ( isRootGroupChat ) {
@@ -342,12 +332,11 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
342332 const isWorkspaceMemberLeavingWorkspaceRoom = isWorkspaceMemberLeavingWorkspaceRoomUtil ( report , isPolicyEmployee , isPolicyAdmin ) ;
343333 leaveRoom ( report . reportID , isWorkspaceMemberLeavingWorkspaceRoom ) ;
344334 } ) ;
345- } , [ isRootGroupChat , isPolicyEmployee , isChatThread , isPolicyAdmin , quickAction ?. chatReportID , report ] ) ;
335+ } , [ isRootGroupChat , isPolicyEmployee , isPolicyAdmin , quickAction ?. chatReportID , report ] ) ;
346336
347337 const shouldShowLeaveButton = canLeaveChat ( report , policy , ! ! reportNameValuePairs ?. private_isArchived ) ;
348338 const shouldShowGoToWorkspace = shouldShowPolicy ( policy , false , currentUserPersonalDetails ?. email ) && ! policy ?. isJoinRequestPending ;
349339
350- // eslint-disable-next-line @typescript-eslint/no-deprecated
351340 const reportName = Parser . htmlToText ( getReportName ( report , undefined , undefined , undefined , undefined , reportAttributes ) ) ;
352341 const additionalRoomDetails =
353342 ( isPolicyExpenseChat && ! ! report ?. isOwnPolicyExpenseChat ) || isExpenseReportUtil ( report ) || isPolicyExpenseChat || isInvoiceRoom
@@ -394,7 +383,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
394383 items . push ( {
395384 key : CONST . REPORT_DETAILS_MENU_ITEM . MEMBERS ,
396385 translationKey : 'common.members' ,
397- icon : expensifyIcons . Users ,
386+ icon : Expensicons . Users ,
398387 subtitle : activeChatMembers . length ,
399388 isAnonymousAction : false ,
400389 shouldShowRightIcon : true ,
@@ -410,7 +399,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
410399 items . push ( {
411400 key : CONST . REPORT_DETAILS_MENU_ITEM . INVITE ,
412401 translationKey : 'common.invite' ,
413- icon : expensifyIcons . Users ,
402+ icon : Expensicons . Users ,
414403 isAnonymousAction : false ,
415404 shouldShowRightIcon : true ,
416405 action : ( ) => {
@@ -423,7 +412,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
423412 items . push ( {
424413 key : CONST . REPORT_DETAILS_MENU_ITEM . SETTINGS ,
425414 translationKey : 'common.settings' ,
426- icon : expensifyIcons . Gear ,
415+ icon : Expensicons . Gear ,
427416 isAnonymousAction : false ,
428417 shouldShowRightIcon : true ,
429418 action : ( ) => {
@@ -439,7 +428,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
439428 items . push ( {
440429 key : CONST . REPORT_DETAILS_MENU_ITEM . TRACK . SUBMIT ,
441430 translationKey : 'actionableMentionTrackExpense.submit' ,
442- icon : expensifyIcons . Send ,
431+ icon : Expensicons . Send ,
443432 isAnonymousAction : false ,
444433 shouldShowRightIcon : true ,
445434 action : ( ) => {
@@ -458,7 +447,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
458447 items . push ( {
459448 key : CONST . REPORT_DETAILS_MENU_ITEM . TRACK . CATEGORIZE ,
460449 translationKey : 'actionableMentionTrackExpense.categorize' ,
461- icon : expensifyIcons . Folder ,
450+ icon : Expensicons . Folder ,
462451 isAnonymousAction : false ,
463452 shouldShowRightIcon : true ,
464453 action : ( ) => {
@@ -468,7 +457,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
468457 items . push ( {
469458 key : CONST . REPORT_DETAILS_MENU_ITEM . TRACK . SHARE ,
470459 translationKey : 'actionableMentionTrackExpense.share' ,
471- icon : expensifyIcons . UserPlus ,
460+ icon : Expensicons . UserPlus ,
472461 isAnonymousAction : false ,
473462 shouldShowRightIcon : true ,
474463 action : ( ) => {
@@ -483,7 +472,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
483472 items . push ( {
484473 key : CONST . REPORT_DETAILS_MENU_ITEM . PRIVATE_NOTES ,
485474 translationKey : 'privateNotes.title' ,
486- icon : expensifyIcons . Pencil ,
475+ icon : Expensicons . Pencil ,
487476 isAnonymousAction : false ,
488477 shouldShowRightIcon : true ,
489478 action : ( ) => navigateToPrivateNotes ( report , currentUserPersonalDetails . accountID , backTo ) ,
@@ -496,7 +485,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
496485 if ( isCompletedTaskReport ( report ) && isTaskActionable ) {
497486 items . push ( {
498487 key : CONST . REPORT_DETAILS_MENU_ITEM . MARK_AS_INCOMPLETE ,
499- icon : expensifyIcons . Checkmark ,
488+ icon : Expensicons . Checkmark ,
500489 translationKey : 'task.markAsIncomplete' ,
501490 isAnonymousAction : false ,
502491 action : callFunctionIfActionIsAllowed ( ( ) => {
@@ -511,7 +500,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
511500 items . push ( {
512501 key : CONST . REPORT_DETAILS_MENU_ITEM . GO_TO_WORKSPACE ,
513502 translationKey : 'workspace.common.goToWorkspace' ,
514- icon : expensifyIcons . Building ,
503+ icon : Expensicons . Building ,
515504 action : ( ) => {
516505 if ( ! report ?. policyID ) {
517506 return ;
@@ -531,7 +520,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
531520 items . push ( {
532521 key : CONST . REPORT_DETAILS_MENU_ITEM . LEAVE_ROOM ,
533522 translationKey : 'common.leave' ,
534- icon : expensifyIcons . Exit ,
523+ icon : Expensicons . Exit ,
535524 isAnonymousAction : true ,
536525 action : ( ) => {
537526 if ( getParticipantsAccountIDsForDisplay ( report , false , true ) . length === 1 && isRootGroupChat ) {
@@ -548,7 +537,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
548537 items . push ( {
549538 key : CONST . REPORT_DETAILS_MENU_ITEM . DEBUG ,
550539 translationKey : 'debug.debug' ,
551- icon : expensifyIcons . Bug ,
540+ icon : Expensicons . Bug ,
552541 action : ( ) => Navigation . navigate ( ROUTES . DEBUG_REPORT . getRoute ( report . reportID ) ) ,
553542 isAnonymousAction : true ,
554543 shouldShowRightIcon : true ,
@@ -560,7 +549,6 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
560549 isSelfDM ,
561550 isArchivedRoom ,
562551 isGroupChat ,
563- expensifyIcons ,
564552 isDefaultRoom ,
565553 isChatThread ,
566554 isPolicyEmployee ,
@@ -653,7 +641,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
653641 updateGroupChatAvatar ( report . reportID ) ;
654642 } }
655643 onImageSelected = { ( file ) => updateGroupChatAvatar ( report . reportID , file ) }
656- editIcon = { expensifyIcons . Camera }
644+ editIcon = { Expensicons . Camera }
657645 editIconStyle = { styles . smallEditIconAccount }
658646 pendingAction = { report . pendingFields ?. avatar ?? undefined }
659647 errors = { report . errorFields ?. avatar ?? null }
@@ -666,7 +654,6 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
666654 isChatRoom ,
667655 isThread ,
668656 isGroupChat ,
669- expensifyIcons ,
670657 icons ,
671658 report ,
672659 styles . avatarXLarge ,
@@ -1017,7 +1004,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
10171004 { shouldShowDeleteButton && (
10181005 < MenuItem
10191006 key = { CONST . REPORT_DETAILS_MENU_ITEM . DELETE }
1020- icon = { expensifyIcons . Trashcan }
1007+ icon = { Expensicons . Trashcan }
10211008 title = { caseID === CASES . DEFAULT ? translate ( 'common.delete' ) : translate ( 'reportActionContextMenu.deleteAction' , { action : requestParentReportAction } ) }
10221009 onPress = { ( ) => setIsDeleteModalVisible ( true ) }
10231010 />
0 commit comments