Skip to content

Commit

Permalink
Add abbr to mobile as well
Browse files Browse the repository at this point in the history
  • Loading branch information
oddsson committed Nov 28, 2024
1 parent a9522a5 commit b8a41b6
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AnimatePresence } from 'framer-motion'
import { Box, FocusableBox, Text } from '@island.is/island-ui/core'
import {
displayFirstPlusRemaining,
districtCourtAbbreviation,
formatDOB,
} from '@island.is/judicial-system/formatters'
import { tables } from '@island.is/judicial-system-web/messages'
Expand Down Expand Up @@ -69,6 +70,7 @@ const MobileCase: FC<PropsWithChildren<Props>> = ({
isLoading = false,
}) => {
const { formatMessage } = useIntl()
const courtAbbreviation = districtCourtAbbreviation(theCase.court?.name)

return (
<CategoryCard
Expand All @@ -91,7 +93,12 @@ const MobileCase: FC<PropsWithChildren<Props>> = ({
<Text title={theCase.policeCaseNumbers?.join(', ')}>
{displayFirstPlusRemaining(theCase.policeCaseNumbers)}
</Text>
{theCase.courtCaseNumber && <Text>{theCase.courtCaseNumber}</Text>}

{theCase.courtCaseNumber && (
<Text>{`${courtAbbreviation ? `${courtAbbreviation}: ` : ''}${
theCase.courtCaseNumber
}`}</Text>
)}
<br />
{theCase.defendants && theCase.defendants.length > 0 && (
<>
Expand Down

0 comments on commit b8a41b6

Please sign in to comment.