diff --git a/frontend/src/components/Buttons/NewBoxModal.tsx b/frontend/src/components/Buttons/NewBoxModal.tsx index 112c392..7a14256 100644 --- a/frontend/src/components/Buttons/NewBoxModal.tsx +++ b/frontend/src/components/Buttons/NewBoxModal.tsx @@ -2,6 +2,7 @@ import { Button, Label, Modal, TextInput, Textarea } from "flowbite-react"; import { useState } from "react"; import { isValid } from "../../misc"; import ErrorMessage from "../ErrorMessage"; +import { useTranslation } from "react-i18next"; interface props { openModal: boolean; @@ -9,6 +10,7 @@ interface props { } const NewBoxModal = ({ openModal, setOpenModal }: props) => { + const { t } = useTranslation(); // height, depth, and length are strings not nums so inputs work better const [width, setWidth] = useState(""); const [height, setHeight] = useState(""); @@ -58,7 +60,7 @@ const NewBoxModal = ({ openModal, setOpenModal }: props) => {

- Create a new box + {t("createBox")}

{error && ( { {/* width */}
-
setWidth(event.target.value)} required /> @@ -85,10 +87,10 @@ const NewBoxModal = ({ openModal, setOpenModal }: props) => { {/* height */}
-
{ {/* depth */}
-
{ {/* comment */}
-