Skip to content

Commit

Permalink
fix(j-s): Handle no defender assigned in indictment case InfoCard (#1…
Browse files Browse the repository at this point in the history
…5414)

* fix(j-s): Handle no defender assigned in indictment case InfoCard

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 2, 2024
1 parent 4f44e1a commit 8b5cb60
Show file tree
Hide file tree
Showing 2 changed files with 9 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,11 @@ 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 8b5cb60

Please sign in to comment.