Skip to content

Commit 8a82588

Browse files
committed
fix issues
1 parent 113909d commit 8a82588

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/components/ReportActionAvatars/useReportActionAvatars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type {OnyxEntry} from 'react-native-onyx';
22
import type {ValueOf} from 'type-fest';
33
import {usePersonalDetails} from '@components/OnyxListItemProvider';
44
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
5+
import useLocalize from '@hooks/useLocalize';
56
import useOnyx from '@hooks/useOnyx';
67
import usePolicy from '@hooks/usePolicy';
78
import useReportIsArchived from '@hooks/useReportIsArchived';

src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ function MoneyRequestReportPreviewContent({
125125
onPress,
126126
forwardedFSClass,
127127
}: MoneyRequestReportPreviewContentProps) {
128-
const Expensicons = useMemoizedLazyExpensifyIcons(['DotIndicator', 'BackArrow', 'ArrowRight'] as const);
129128
const [chatReportMetadata] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${chatReportID}`, {canBeMissing: true, allowStaleData: true});
130129
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: true});
131130
const activePolicy = usePolicy(activePolicyID);

src/libs/ReportUtils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5206,7 +5206,10 @@ function getReportPreviewMessage(
52065206
}
52075207

52085208
const payerAccountID = iouReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? iouReportAction?.actorAccountID : report.managerID;
5209-
let actualPayerName = report.managerID === currentUserAccountID && !isForListPreview ? '' : getDisplayNameForParticipant({accountID: payerAccountID, shouldUseShortForm: true, formatPhoneNumber: formatPhoneNumberPhoneUtils});
5209+
let actualPayerName =
5210+
report.managerID === currentUserAccountID && !isForListPreview
5211+
? ''
5212+
: getDisplayNameForParticipant({accountID: payerAccountID, shouldUseShortForm: true, formatPhoneNumber: formatPhoneNumberPhoneUtils});
52105213

52115214
actualPayerName = actualPayerName && isForListPreview && !isPreviewMessageForParentChatReport ? `${actualPayerName}:` : actualPayerName;
52125215
const payerDisplayName = isPreviewMessageForParentChatReport ? payerName : actualPayerName;

src/pages/ReportAddApproverPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import withReportOrNotFound from './home/report/withReportOrNotFound';
3232
type ReportAddApproverPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps<ReportChangeApproverParamList, typeof SCREENS.REPORT_CHANGE_APPROVER.ADD_APPROVER>;
3333

3434
function ReportAddApproverPage({report, isLoadingReportData, policy}: ReportAddApproverPageProps) {
35-
const {FallbackAvatar} = useMemoizedLazyExpensifyIcons(['FallbackAvatar'] as const);
3635
const styles = useThemeStyles();
3736
const {translate, formatPhoneNumber} = useLocalize();
3837
const [selectedApproverEmail, setSelectedApproverEmail] = useState<string | undefined>(undefined);
@@ -82,7 +81,7 @@ function ReportAddApproverPage({report, isLoadingReportData, policy}: ReportAddA
8281
};
8382
})
8483
.filter((approver): approver is SelectionListApprover => !!approver);
85-
}, [employeeList, report, policy, personalDetails, selectedApproverEmail, translate, expensifyIcons.FallbackAvatar]);
84+
}, [employeeList, report, policy, personalDetails, formatPhoneNumber, selectedApproverEmail, expensifyIcons.FallbackAvatar, translate]);
8685

8786
const addApprover = useCallback(() => {
8887
const employeeAccountID = allApprovers.find((approver) => approver.login === selectedApproverEmail)?.value;

0 commit comments

Comments
 (0)