Skip to content

Commit

Permalink
fix: info box missing org unit optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Jan 17, 2025
1 parent fc96d0e commit 2854ec8
Showing 1 changed file with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const InfoBoxPlain = ({
orgUnitName,
classes,
}: Props) => {
if (!scheduleDate || !suggestedScheduleDate || !orgUnitName) {
if (!scheduleDate || !suggestedScheduleDate) {
return null;
}

Expand Down Expand Up @@ -54,17 +54,22 @@ const InfoBoxPlain = ({
},
)
}
{' '}
{i18n.t('There are {{count}} scheduled event in {{orgUnitName}} on this day.', {
count: eventCountInOrgUnit,
orgUnitName,
defaultValue: 'There are {{count}} scheduled event in {{orgUnitName}} on this day.',
defaultValue_plural: 'There are {{count}} scheduled events in {{orgUnitName}} on this day.',
interpolation: {
escapeValue: false,
},
})}
{!!orgUnitName && (
<>
{' '}
{i18n.t('There are {{count}} scheduled event in {{orgUnitName}} on this day.', {
count: eventCountInOrgUnit,
orgUnitName,
defaultValue: 'There are {{count}} scheduled event in {{orgUnitName}} on this day.',
defaultValue_plural: 'There are {{count}} scheduled events in {{orgUnitName}} on this day.',
interpolation: {
escapeValue: false,
},
})}
</>
)}
</>

)}
</NoticeBox>
);
Expand Down

0 comments on commit 2854ec8

Please sign in to comment.