From a2f5b588c37816587066932341fd9bab37b1045d Mon Sep 17 00:00:00 2001 From: Cephas Chapa Date: Mon, 6 Jan 2025 15:20:03 +0200 Subject: [PATCH 1/2] fix(ui): adds translation function to translate label correctly --- app/src/components/Modals/delete-inventory-modal.tsx | 2 +- app/src/components/password-input.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/components/Modals/delete-inventory-modal.tsx b/app/src/components/Modals/delete-inventory-modal.tsx index 191f4f017..84cf172b5 100644 --- a/app/src/components/Modals/delete-inventory-modal.tsx +++ b/app/src/components/Modals/delete-inventory-modal.tsx @@ -192,7 +192,7 @@ const DeleteInventoryModal: FC = ({ error={errors.password} register={register} t={t} - name="Password" + name={t("password")} /> - {t(error.message)} + {t(error.message!)} )} From 1cbe7bd179a982569af33924fd43da84fb909134 Mon Sep 17 00:00:00 2001 From: Cephas Chapa <42181542+cephaschapa@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:54:16 +0200 Subject: [PATCH 2/2] Update password-input.tsx removes unsafe error message access --- app/src/components/password-input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/password-input.tsx b/app/src/components/password-input.tsx index d65ed7f10..e36406766 100644 --- a/app/src/components/password-input.tsx +++ b/app/src/components/password-input.tsx @@ -188,7 +188,7 @@ export default function PasswordInput({ letterSpacing="wide" color="content.tertiary" > - {t(error.message!)} + {t(error.message)} )}