diff --git a/client/src/App/App.container.jsx b/client/src/App/App.container.jsx index 2d2023cfe..42212ca66 100644 --- a/client/src/App/App.container.jsx +++ b/client/src/App/App.container.jsx @@ -86,7 +86,7 @@ function AppContainer({ currentUser, setDarkMode }) { theme={theme} form={{ validateMessages: { - required: t("general.validation.required", { label: "${label}" }) + required: t("general.validation.required", { label: "{{label}}" }) } }} > diff --git a/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx b/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx index 8f3e33d69..90911f056 100644 --- a/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx +++ b/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx @@ -1,4 +1,4 @@ -import { useApolloClient, useMutation } from "@apollo/client"; +import { useMutation } from "@apollo/client"; import { Form, Modal } from "antd"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; @@ -42,9 +42,7 @@ export function NoteUpsertModalContainer({ currentUser, noteUpsertModal, toggleM const { refetch } = actions; const [form] = Form.useForm(); - - const { client } = useApolloClient(); - + useEffect(() => { //Required to prevent infinite looping. if (existingNote && open) { diff --git a/client/src/components/production-board-kanban/trello-board/styles/Base.js b/client/src/components/production-board-kanban/trello-board/styles/Base.js index 13b290a14..93575fbd5 100644 --- a/client/src/components/production-board-kanban/trello-board/styles/Base.js +++ b/client/src/components/production-board-kanban/trello-board/styles/Base.js @@ -85,7 +85,7 @@ export const StyleHorizontal = styled.div` .react-trello-card { height: auto; - margin: 2px; + margin: 2px 0 2px; } .size-memory-wrapper { diff --git a/client/src/components/shop-info/useFormDataPreservation.js b/client/src/components/shop-info/useFormDataPreservation.js index ffd605e00..310ff0202 100644 --- a/client/src/components/shop-info/useFormDataPreservation.js +++ b/client/src/components/shop-info/useFormDataPreservation.js @@ -1,4 +1,4 @@ -import { useEffect } from "react"; +import { useCallback, useEffect } from "react"; import { HasFeatureAccess } from "./../feature-wrapper/feature-wrapper.component"; /** @@ -24,7 +24,7 @@ export const useFormDataPreservation = (form, bodyshop, featureConfig) => { parent[lastKey] = value; }; - const preserveHiddenFormData = () => { + const preserveHiddenFormData = useCallback(() => { const preservationData = {}; let hasDataToPreserve = false; @@ -51,7 +51,7 @@ export const useFormDataPreservation = (form, bodyshop, featureConfig) => { if (hasDataToPreserve) { form.setFieldsValue(preservationData); } - }; + }, [form, featureConfig, bodyshop]); const getCompleteFormValues = () => { const currentFormValues = form.getFieldsValue(); @@ -88,7 +88,7 @@ export const useFormDataPreservation = (form, bodyshop, featureConfig) => { useEffect(() => { preserveHiddenFormData(); - }, [bodyshop]); + }, [bodyshop, preserveHiddenFormData]); return { preserveHiddenFormData, getCompleteFormValues, createSubmissionHandler }; };