@@ -8,7 +8,6 @@ import ConfirmModal from '@components/ConfirmModal';
88import DecisionModal from '@components/DecisionModal' ;
99import EmptyStateComponent from '@components/EmptyStateComponent' ;
1010import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
11- import * as Expensicons from '@components/Icon/Expensicons' ;
1211import LottieAnimations from '@components/LottieAnimations' ;
1312import RenderHTML from '@components/RenderHTML' ;
1413import ScreenWrapper from '@components/ScreenWrapper' ;
@@ -20,7 +19,7 @@ import type {ListItem} from '@components/SelectionListWithSections/types';
2019import TableListItemSkeleton from '@components/Skeletons/TableRowSkeleton' ;
2120import Text from '@components/Text' ;
2221import useCleanupSelectedOptions from '@hooks/useCleanupSelectedOptions' ;
23- import { useMemoizedLazyIllustrations } from '@hooks/useLazyAsset' ;
22+ import { useMemoizedLazyExpensifyIcons , useMemoizedLazyIllustrations } from '@hooks/useLazyAsset' ;
2423import useLocalize from '@hooks/useLocalize' ;
2524import useMobileSelectionMode from '@hooks/useMobileSelectionMode' ;
2625import useNetwork from '@hooks/useNetwork' ;
@@ -130,6 +129,7 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) {
130129 const [ policyCategories ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY_CATEGORIES } ${ policyID } ` , { canBeMissing : false } ) ;
131130 const isMobileSelectionModeEnabled = useMobileSelectionMode ( ) ;
132131 const illustrations = useMemoizedLazyIllustrations ( [ 'PerDiem' ] as const ) ;
132+ const expensifyIcons = useMemoizedLazyExpensifyIcons ( [ 'Gear' , 'Table' , 'Download' , 'Trashcan' ] as const ) ;
133133
134134 const [ customUnit , allRatesArray , allSubRates ] = useMemo ( ( ) => {
135135 const customUnits = getPerDiemCustomUnit ( policy ) ;
@@ -275,14 +275,14 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) {
275275 const menuItems = [ ] ;
276276 if ( policy ?. areCategoriesEnabled && hasEnabledOptions ( policyCategories ?? { } ) ) {
277277 menuItems . push ( {
278- icon : Expensicons . Gear ,
278+ icon : expensifyIcons . Gear ,
279279 text : translate ( 'common.settings' ) ,
280280 onSelected : openSettings ,
281281 value : CONST . POLICY . SECONDARY_ACTIONS . SETTINGS ,
282282 } ) ;
283283 }
284284 menuItems . push ( {
285- icon : Expensicons . Table ,
285+ icon : expensifyIcons . Table ,
286286 text : translate ( 'spreadsheet.importSpreadsheet' ) ,
287287 onSelected : ( ) => {
288288 if ( isOffline ) {
@@ -295,30 +295,43 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) {
295295 } ) ;
296296 if ( hasVisibleSubRates ) {
297297 menuItems . push ( {
298- icon : Expensicons . Download ,
298+ icon : expensifyIcons . Download ,
299299 text : translate ( 'spreadsheet.downloadCSV' ) ,
300300 onSelected : ( ) => {
301301 if ( isOffline ) {
302302 close ( ( ) => setIsOfflineModalVisible ( true ) ) ;
303303 return ;
304304 }
305- downloadPerDiemCSV ( policyID , ( ) => {
306- setIsDownloadFailureModalVisible ( true ) ;
307- } ) ;
305+ close ( ( ) =>
306+ downloadPerDiemCSV ( policyID , ( ) => {
307+ setIsDownloadFailureModalVisible ( true ) ;
308+ } ) ,
309+ ) ;
308310 } ,
309311 value : CONST . POLICY . SECONDARY_ACTIONS . DOWNLOAD_CSV ,
310312 } ) ;
311313 }
312314
313315 return menuItems ;
314- } , [ policy ?. areCategoriesEnabled , policyCategories , translate , hasVisibleSubRates , openSettings , isOffline , policyID ] ) ;
316+ } , [
317+ policy ?. areCategoriesEnabled ,
318+ policyCategories ,
319+ translate ,
320+ hasVisibleSubRates ,
321+ openSettings ,
322+ isOffline ,
323+ policyID ,
324+ expensifyIcons . Gear ,
325+ expensifyIcons . Table ,
326+ expensifyIcons . Download ,
327+ ] ) ;
315328
316329 const getHeaderButtons = ( ) => {
317330 const options : Array < DropdownOption < DeepValueOf < typeof CONST . POLICY . BULK_ACTION_TYPES > > > = [ ] ;
318331
319332 if ( shouldUseNarrowLayout ? canSelectMultiple : selectedPerDiem . length > 0 ) {
320333 options . push ( {
321- icon : Expensicons . Trashcan ,
334+ icon : expensifyIcons . Trashcan ,
322335 text : translate ( 'workspace.perDiem.deleteRates' , { count : selectedPerDiem . length } ) ,
323336 value : CONST . POLICY . BULK_ACTION_TYPES . DELETE ,
324337 onSelected : ( ) => setDeletePerDiemConfirmModalVisible ( true ) ,
0 commit comments