diff --git a/src/components/ReportWelcomeText.tsx b/src/components/ReportWelcomeText.tsx index 08c172c86c9c..cc7dbed1f6e9 100644 --- a/src/components/ReportWelcomeText.tsx +++ b/src/components/ReportWelcomeText.tsx @@ -3,10 +3,10 @@ import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; import {useOnyx} from 'react-native-onyx'; import useLocalize from '@hooks/useLocalize'; +import usePermissions from '@hooks/usePermissions'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; import * as OptionsListUtils from '@libs/OptionsListUtils'; -import Permissions from '@libs/Permissions'; import {getPolicy} from '@libs/PolicyUtils'; import * as ReportUtils from '@libs/ReportUtils'; import SidebarUtils from '@libs/SidebarUtils'; @@ -47,6 +47,7 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) { const welcomeMessage = SidebarUtils.getWelcomeMessage(report, policy); const moneyRequestOptions = ReportUtils.temporary_getMoneyRequestOptions(report, policy, participantAccountIDs); const canEditReportDescription = ReportUtils.canEditReportDescription(report, policy); + const {canUseCombinedTrackSubmit} = usePermissions(); const filteredOptions = moneyRequestOptions.filter( (item): item is Exclude => item !== CONST.IOU.TYPE.INVOICE, @@ -55,7 +56,7 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) { .map( (item, index) => `${index === filteredOptions.length - 1 && index > 0 ? `${translate('common.or')} ` : ''}${translate( - Permissions.canUseCombinedTrackSubmit() && item === 'submit' ? `reportActionsView.create` : `reportActionsView.iouTypes.${item}`, + canUseCombinedTrackSubmit && item === 'submit' ? `reportActionsView.create` : `reportActionsView.iouTypes.${item}`, )}`, ) .join(', ');