Skip to content

Commit

Permalink
Make sure there is no settled 0 messages showing
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed May 18, 2023
1 parent 4201994 commit 4d41619
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const ReportPreview = (props) => {
const isCurrentUserManager = managerEmail === lodashGet(props.session, 'email', null);
return (
<View style={[styles.chatItemMessage, styles.mt4]}>
{_.map(props.action.message, (index) => (
{_.map(props.action.message, (message, index) => (
<Pressable
key={`ReportPreview-${props.action.reportActionID}-${index}`}
onPress={() => {
Expand All @@ -114,10 +114,12 @@ const ReportPreview = (props) => {
>
<View style={[styles.flexShrink1]}>
{props.iouReport.hasOutstandingIOU ? (
<Text style={[styles.chatItemMessage, styles.cursorPointer]}>{props.translate('iou.payerOwesAmount', {payer: managerName, amount: reportAmount})}</Text>
<Text style={[styles.chatItemMessage, styles.cursorPointer]}>
{lodashGet(message, 'html', props.translate('iou.payerOwesAmount', {payer: managerName, amount: reportAmount}))}
</Text>
) : (
<View style={[styles.flexRow]}>
<Text style={[styles.chatItemMessage, styles.cursorPointer]}>{props.translate('iou.payerSettled', {amount: reportAmount})}</Text>
<Text style={[styles.chatItemMessage, styles.cursorPointer]}>{lodashGet(message, 'html', props.translate('iou.payerSettled', {amount: reportAmount}))}</Text>
{!props.iouReport.hasOutstandingIOU && (
<Icon
style={[styles.ml10]}
Expand Down

0 comments on commit 4d41619

Please sign in to comment.