@@ -10,7 +10,6 @@ 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' ;
1413import MenuItem from '@components/MenuItem' ;
1514import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription' ;
1615import OfflineWithFeedback from '@components/OfflineWithFeedback' ;
@@ -27,6 +26,7 @@ import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'
2726import useDeleteTransactions from '@hooks/useDeleteTransactions' ;
2827import useDuplicateTransactionsAndViolations from '@hooks/useDuplicateTransactionsAndViolations' ;
2928import useGetIOUReportFromReportAction from '@hooks/useGetIOUReportFromReportAction' ;
29+ import { useMemoizedLazyExpensifyIcons } from '@hooks/useLazyAsset' ;
3030import useLocalize from '@hooks/useLocalize' ;
3131import useNetwork from '@hooks/useNetwork' ;
3232import useOnyx from '@hooks/useOnyx' ;
@@ -41,7 +41,6 @@ import Navigation from '@libs/Navigation/Navigation';
4141import type { PlatformStackScreenProps } from '@libs/Navigation/PlatformStackNavigation/types' ;
4242import type { ReportDetailsNavigatorParamList } from '@libs/Navigation/types' ;
4343import { getPersonalDetailsForAccountIDs } from '@libs/OptionsListUtils' ;
44- import Parser from '@libs/Parser' ;
4544import Permissions from '@libs/Permissions' ;
4645import { isPolicyAdmin as isPolicyAdminUtil , isPolicyEmployee as isPolicyEmployeeUtil , shouldShowPolicy } from '@libs/PolicyUtils' ;
4746import { getOneTransactionThreadReportID , getOriginalMessage , getTrackExpenseActionableWhisper , isDeletedAction , isMoneyRequestAction , isTrackExpenseAction } from '@libs/ReportActionsUtils' ;
@@ -149,6 +148,7 @@ const CASES = {
149148type CaseID = ValueOf < typeof CASES > ;
150149
151150function ReportDetailsPage ( { policy, report, route, reportMetadata} : ReportDetailsPageProps ) {
151+ const Expensicons = useMemoizedLazyExpensifyIcons ( [ 'Bug' , 'Building' , 'Camera' , 'Checkmark' , 'Exit' , 'Folder' , 'Gear' , 'Pencil' , 'Send' , 'Trashcan' , 'UserPlus' , 'Users' ] as const ) ;
152152 const { translate, localeCompare} = useLocalize ( ) ;
153153 const { isOffline} = useNetwork ( ) ;
154154 const { isRestrictedToPreferredPolicy, preferredPolicyID} = usePreferredPolicy ( ) ;
@@ -332,8 +332,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
332332
333333 const shouldShowLeaveButton = canLeaveChat ( report , policy , ! ! reportNameValuePairs ?. private_isArchived ) ;
334334 const shouldShowGoToWorkspace = shouldShowPolicy ( policy , false , currentUserPersonalDetails ?. email ) && ! policy ?. isJoinRequestPending ;
335-
336- const reportName = Parser . htmlToText ( getReportName ( report , undefined , undefined , undefined , undefined , reportAttributes ) ) ;
335+ const reportName = getReportName ( report , undefined , undefined , undefined , undefined , reportAttributes ) ;
337336
338337 const additionalRoomDetails =
339338 ( isPolicyExpenseChat && ! ! report ?. isOwnPolicyExpenseChat ) || isExpenseReportUtil ( report ) || isPolicyExpenseChat || isInvoiceRoom
@@ -578,6 +577,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
578577 isRestrictedToPreferredPolicy ,
579578 preferredPolicyID ,
580579 introSelected ,
580+ Expensicons ,
581581 ] ) ;
582582
583583 const displayNamesWithTooltips = useMemo ( ( ) => {
@@ -660,6 +660,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
660660 policy ,
661661 participants ,
662662 moneyRequestReport ?. reportID ,
663+ Expensicons ,
663664 ] ) ;
664665
665666 const canJoin = canJoinChat ( report , parentReportAction , policy , ! ! reportNameValuePairs ?. private_isArchived ) ;
0 commit comments