Skip to content

Commit

Permalink
fix: use translateProperty in UploadShowComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
thiago-silva-tech authored and dziraf committed Jan 4, 2024
1 parent 3e02bd9 commit ccb45da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/features/upload-file/components/UploadShowComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { FormGroup, Label } from '@adminjs/design-system'
import { ShowPropertyProps } from 'adminjs'
import { ShowPropertyProps, useTranslation } from 'adminjs'
import React, { FC } from 'react'

import File from './file.js'

const Show: FC<ShowPropertyProps> = (props) => {
const { property } = props
const { translateProperty } = useTranslation()

return (
<FormGroup>
<Label>{property.label}</Label>
<Label>{translateProperty(property.label, property.resourceId)}</Label>
<File width="100%" {...props} />
</FormGroup>
)
Expand Down

0 comments on commit ccb45da

Please sign in to comment.