diff --git a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx index 7d860a8f9f47..eadbf98ea3c6 100644 --- a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx +++ b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx @@ -54,14 +54,11 @@ export const getAppealExpirationInfo = ( const getVerdictViewDateText = ( formatMessage: IntlShape['formatMessage'], verdictViewDate?: string | null, - serviceNotRequired?: boolean, ): string => { if (verdictViewDate) { return formatMessage(strings.verdictDisplayedDate, { date: formatDate(verdictViewDate, 'PPP'), }) - } else if (serviceNotRequired) { - return formatMessage(strings.serviceNotRequired) } else { return formatMessage(strings.serviceRequired) } @@ -129,23 +126,19 @@ export const DefendantInfo: FC = (props) => { )} {displayAppealExpirationInfo && ( - - - {formatMessage(appealExpirationInfo.message, { - appealExpirationDate: appealExpirationInfo.date, - })} - - - )} - {displayVerdictViewDate && defendant.serviceRequirement && ( - - {getVerdictViewDateText( - formatMessage, - defendant.verdictViewDate, - defendant.serviceRequirement === ServiceRequirement.NOT_REQUIRED, - )} + + {formatMessage(appealExpirationInfo.message, { + appealExpirationDate: appealExpirationInfo.date, + })} )} + {displayVerdictViewDate && + defendant.serviceRequirement && + defendant.serviceRequirement !== ServiceRequirement.NOT_REQUIRED && ( + + {getVerdictViewDateText(formatMessage, defendant.verdictViewDate)} + + )} ) }