Skip to content

Commit

Permalink
fix(j-s): Handle no defender assigned in indictment case InfoCard
Browse files Browse the repository at this point in the history
  • Loading branch information
unakb committed Jul 2, 2024
1 parent 44d6d0d commit 09dbcd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ export const strings = defineMessages({
defaultMessage: 'Verjandi',
description: 'Notað til að birta titil á verjanda í ákæru.',
},
noDefenderAssigned: {
id: 'judicial.system.core:info_card.defendant_info.no_defender_assigned',
defaultMessage: 'Ekki skráður',
description:
'Notað til að láta vita að enginn verjandi er skráður í ákæru.',
},
})
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ export const DefendantInfo: FC<DefendantInfoProps> = ({
</Box>
)}

{defendant.defenderName && displayDefenderInfo && (
{displayDefenderInfo && (
<Box display="flex" key={defendant.defenderName} role="paragraph">
<Text as="span">{`${formatMessage(strings.defender)}: ${
defendant.defenderName
defendant.defenderName ?? formatMessage(strings.noDefenderAssigned)
}`}</Text>
{defendant.defenderEmail && (
<>
Expand Down

0 comments on commit 09dbcd3

Please sign in to comment.