Skip to content

Commit

Permalink
Merge pull request #1043 from Open-Earth-Foundation/fix/hardcoded-lab…
Browse files Browse the repository at this point in the history
…el-on-delete-inventory-form

fix(ui): adds translation function to translate label correctly
  • Loading branch information
evanp authored Jan 7, 2025
2 parents 14cbdcc + 1cbe7bd commit 31624fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/components/Modals/delete-inventory-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const DeleteInventoryModal: FC<DeleteInventoryModalProps> = ({
error={errors.password}
register={register}
t={t}
name="Password"
name={t("password")}
/>
<Box
display="flex"
Expand Down
5 changes: 3 additions & 2 deletions app/src/components/password-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import {
import { useState } from "react";
import { FieldError } from "react-hook-form";
import { CheckListIcon, CloseListIcon } from "./icons";
import { TFunction } from "i18next";

export default function PasswordInput({
children,
error,
register,
t,
name = t("password"),
name,
id = "password",
w,
shouldValidate = false,
Expand All @@ -30,7 +31,7 @@ export default function PasswordInput({
children?: React.ReactNode;
error: FieldError | undefined;
register: Function;
t: Function;
t: TFunction;
name?: String;
id?: String;
w?: string;
Expand Down

0 comments on commit 31624fe

Please sign in to comment.