Fix MultiLinefield hook order warning

This commit is contained in:
2026-04-07 12:30:35 +01:00
parent f886fb8f25
commit 52071058d6
2 changed files with 29 additions and 2 deletions
+3 -2
View File
@@ -249,6 +249,7 @@ export function MultiLinefield(props) {
//console.log(showIfHasParentShowValue, formProps[form].values[parentField]);
let { t } = useTranslation();
const translatedLabel = FieldsTranslations(props.label);
const requiredMessage = t("newappeal:is-required-label");
const emojiNotAllowedMessage = t("newappeal:emojis-not-allowed-label");
@@ -259,7 +260,7 @@ export function MultiLinefield(props) {
showIfHasParentShowValue && (
<div>
<label className="govuk-label" htmlFor={props.name}>
{FieldsTranslations(props.label)}
{translatedLabel}
</label>
<div
@@ -296,7 +297,7 @@ export function MultiLinefield(props) {
) : (
<div className="govuk-form-group">
<label className="govuk-label" htmlFor={props.name}>
{FieldsTranslations(props.label)}
{translatedLabel}
</label>
<div
id={props.name + "-hint"}