build fixes
This commit is contained in:
@@ -32,7 +32,7 @@ const RenderTextfield = ({
|
||||
}
|
||||
>
|
||||
<label className="govuk-label " htmlFor={id} id={id + "_label"}>
|
||||
{fieldsTranslations(label)}
|
||||
{FieldsTranslations(label)}
|
||||
</label>
|
||||
{touched && error && (
|
||||
<span id={id + "-error"} className="govuk-error-message">
|
||||
@@ -106,7 +106,7 @@ export function MultiLinefield(props) {
|
||||
<div className="govuk-form-group">
|
||||
<h1 className="govuk-label-wrapper">
|
||||
<label className="govuk-label" htmlFor={props.name}>
|
||||
{fieldsTranslations(props.label)}
|
||||
{FieldsTranslations(props.label)}
|
||||
</label>
|
||||
</h1>
|
||||
<div
|
||||
@@ -159,7 +159,7 @@ const RenderDatePicker = ({
|
||||
className="govuk-fieldset__heading"
|
||||
id={id + "_label"}
|
||||
>
|
||||
{fieldsTranslations(label)}
|
||||
{FieldsTranslations(label)}
|
||||
</label>
|
||||
</legend>
|
||||
{touched && error && (
|
||||
@@ -216,7 +216,7 @@ export function DateField(props) {
|
||||
>
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s govuk-!-font-weight-regular">
|
||||
<label className="govuk-fieldset__heading">
|
||||
{fieldsTranslations(props.label)}
|
||||
{FieldsTranslations(props.label)}
|
||||
</label>
|
||||
</legend>
|
||||
<div className="govuk-date-input" id={name}>
|
||||
@@ -312,7 +312,7 @@ const RenderYesNo = ({
|
||||
className="govuk-fieldset__heading govuk-body-m"
|
||||
id={id + "_label"}
|
||||
>
|
||||
{fieldsTranslations(label)}
|
||||
{FieldsTranslations(label)}
|
||||
</label>
|
||||
</legend>
|
||||
{touched && error && (
|
||||
@@ -400,7 +400,7 @@ const RenderPickList = ({
|
||||
{Object.keys(dropdownObj).map((key, index) => {
|
||||
return (
|
||||
<option key={key} value={dropdownObj[key].Value}>
|
||||
{pickListTranslations(
|
||||
{PickListTranslations(
|
||||
dropdownObj[key].Label.LocalizedLabels[0].Label
|
||||
)}
|
||||
</option>
|
||||
@@ -419,7 +419,7 @@ export function PickList(props) {
|
||||
return (
|
||||
<div className="govuk-form-group">
|
||||
<label className="govuk-label govuk-body-m" htmlFor={props.name}>
|
||||
{fieldsTranslations(label)}
|
||||
{FieldsTranslations(label)}
|
||||
</label>
|
||||
<Field
|
||||
name={props.name}
|
||||
@@ -437,7 +437,7 @@ export function NumericField(props) {
|
||||
return (
|
||||
<div className="govuk-form-group">
|
||||
<label className="govuk-label" htmlFor={props.name}>
|
||||
{fieldsTranslations(props.label)}
|
||||
{FieldsTranslations(props.label)}
|
||||
</label>
|
||||
<Field
|
||||
name={props.name}
|
||||
@@ -461,7 +461,7 @@ export function DecimalField(props) {
|
||||
return (
|
||||
<div className="govuk-form-group">
|
||||
<label className="govuk-label" htmlFor={props.name}>
|
||||
{fieldsTranslations(props.label)}
|
||||
{FieldsTranslations(props.label)}
|
||||
</label>
|
||||
<Field
|
||||
name={props.name}
|
||||
@@ -487,7 +487,7 @@ export function ReadOnlyfield(props) {
|
||||
return (
|
||||
<div className="govuk-form-group">
|
||||
<label className="govuk-label " htmlFor={props.name}>
|
||||
{fieldsTranslations(props.label)}
|
||||
{FieldsTranslations(props.label)}
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
@@ -502,8 +502,7 @@ export function ReadOnlyfield(props) {
|
||||
);
|
||||
}
|
||||
|
||||
const fieldsTranslations = (label) => {
|
||||
let { t } = useTranslation();
|
||||
const FieldsTranslations = (label) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
@@ -520,8 +519,7 @@ const fieldsTranslations = (label) => {
|
||||
return labelTrans;
|
||||
};
|
||||
|
||||
const pickListTranslations = (optionValue) => {
|
||||
let { t } = useTranslation();
|
||||
const PickListTranslations = (optionValue) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { appealtypes } = router.query;
|
||||
|
||||
Reference in New Issue
Block a user