Skip to content

Commit

Permalink
fix: use translateLabel to translate enum label to match label in dro…
Browse files Browse the repository at this point in the history
…pdown
  • Loading branch information
dziraf committed Jun 30, 2024
1 parent bb31052 commit 0b9ea94
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const DefaultPropertyValue: FC<ShowPropertyProps> = ({
resource: { id: resourceId },
}) => {
const rawValue = record?.params[path]
const { translateProperty } = useTranslation()
const { tl } = useTranslation()

if (typeof rawValue === 'undefined') return null

Expand All @@ -23,7 +23,7 @@ const DefaultPropertyValue: FC<ShowPropertyProps> = ({
const label = option.label || rawValue
return (
<Badge>
{translateProperty(`${propertyPath}.${label}`, resourceId, {
{tl(`${propertyPath}.${label}`, resourceId, {
defaultValue: startCase(label),
})}
</Badge>
Expand Down

0 comments on commit 0b9ea94

Please sign in to comment.