From 196b38cb91fe20970ec68eba81be8dce46266023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99gielewski?= Date: Sun, 20 Aug 2023 13:46:42 +0200 Subject: [PATCH] fix: use translateProperty in UploadEditComponent --- src/features/upload-file/components/UploadEditComponent.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/upload-file/components/UploadEditComponent.tsx b/src/features/upload-file/components/UploadEditComponent.tsx index 07d3e53..8818cc2 100644 --- a/src/features/upload-file/components/UploadEditComponent.tsx +++ b/src/features/upload-file/components/UploadEditComponent.tsx @@ -1,9 +1,10 @@ import { DropZone, DropZoneItem, FormGroup, Label } from '@adminjs/design-system' -import { EditPropertyProps, flat } from 'adminjs' +import { EditPropertyProps, flat, useTranslation } from 'adminjs' import React, { FC, useEffect, useState } from 'react' import PropertyCustom from '../types/property-custom.type.js' const Edit: FC = ({ property, record, onChange }) => { + const { translateProperty } = useTranslation() const { params } = record const { custom } = property as unknown as { custom: PropertyCustom } @@ -63,7 +64,7 @@ const Edit: FC = ({ property, record, onChange }) => { return ( - +