From f717f4b5fb7a76b32d701a25daf7b95389285d6b Mon Sep 17 00:00:00 2001 From: s-alves10 Date: Sun, 3 Dec 2023 13:29:35 -0600 Subject: [PATCH 1/2] fix: sort participant avatars by its accountID --- src/components/ReportActionItem/MoneyRequestPreview.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview.js b/src/components/ReportActionItem/MoneyRequestPreview.js index ce1c248962aa..d5ab4893a868 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.js +++ b/src/components/ReportActionItem/MoneyRequestPreview.js @@ -152,8 +152,9 @@ function MoneyRequestPreview(props) { const participantAccountIDs = props.isBillSplit ? lodashGet(props.action, 'originalMessage.participantAccountIDs', []) : [managerID, ownerAccountID]; const participantAvatars = OptionsListUtils.getAvatarsForAccountIDs(participantAccountIDs, props.personalDetails); + const sortedParticipantAvatars = _.sortBy(participantAvatars, (avatar) => avatar.id); if (isPolicyExpenseChat && props.isBillSplit) { - participantAvatars.push(ReportUtils.getWorkspaceIcon(props.chatReport)); + sortedParticipantAvatars.push(ReportUtils.getWorkspaceIcon(props.chatReport)); } // Pay button should only be visible to the manager of the report. @@ -296,7 +297,7 @@ function MoneyRequestPreview(props) { Date: Sun, 3 Dec 2023 14:23:59 -0600 Subject: [PATCH 2/2] fix: prettier --- src/components/ReportActionItem/MoneyRequestPreview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview.js b/src/components/ReportActionItem/MoneyRequestPreview.js index d5ab4893a868..47b0373a90fa 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.js +++ b/src/components/ReportActionItem/MoneyRequestPreview.js @@ -297,7 +297,8 @@ function MoneyRequestPreview(props) {