Fix MultiLinefield hook order warning
This commit is contained in:
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user