build fixes

This commit is contained in:
2021-10-07 15:34:22 +01:00
parent 59f7d95f88
commit 11928e35b9
8 changed files with 26 additions and 24 deletions
+12 -14
View File
@@ -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;
+5 -1
View File
@@ -1,4 +1,5 @@
import Link from "next/link";
import Image from "next/image";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import Banner from "../components/banner";
@@ -47,7 +48,10 @@ const Header = (props) => {
<Link href={t("common:gov-wales-link")}>
<a className="govuk-header__link govuk-header__link--homepage">
<span className="govuk-header__logotype header__logo">
<img src="/assets/images/cymru.svg" />
<img
alt="gov.wales"
src="/assets/images/cymru.svg"
/>
</span>
</a>
</Link>
+2 -2
View File
@@ -28,8 +28,8 @@ export default function Home({ children, pages }) {
<CaseSearch />
<CaseComment />
<Dns />
<Login />
{/* <Inspectorate /> */}
{/*<Login />
<Inspectorate /> */}
</div>
</div>
</div>
+3 -4
View File
@@ -53,8 +53,7 @@ let BuildCheckRow = (props) => {
return dateString;
}
const fieldsTranslations = (label) => {
let { t } = useTranslation();
const FieldsTranslations = (label) => {
const router = useRouter();
const { locale } = router;
const { appealtypes } = router.query;
@@ -95,7 +94,7 @@ let BuildCheckRow = (props) => {
return (
<div className="govuk-summary-list__row" key={key}>
<dt className="govuk-summary-list__key">
{fieldsTranslations(rows[0].value)}
{FieldsTranslations(rows[0].value)}
</dt>
<dd className="govuk-summary-list__value">
{fieldtype[0].value ==
@@ -121,7 +120,7 @@ let BuildCheckRow = (props) => {
{t("newappeal:change-link-label")}
<span className="govuk-visually-hidden">
{" "}
{fieldsTranslations(rows[0].value)}
{FieldsTranslations(rows[0].value)}
</span>
</a>
</dd>
+1
View File
@@ -1,4 +1,5 @@
import Link from "next/link";
import Image from "next/image";
import useTranslation from "next-translate/useTranslation";
import router from "next/router";
+1 -1
View File
@@ -1,5 +1,5 @@
{
"title-paragraph": "A Development of National Significance (DNS) is a type of planning application for a large infrastructure project of national importance in Wales. Here you can find out about proposed DNS applications. This site is managed by the Planning Inspectorate.",
"title-paragraph": "A Development of National Significance (DNS) is a type of planning application for a large infrastructure project of national importance in Wales. Here you can find out about proposed DNS applications.",
"title-application-search-placeholder": "Search application name",
"title-application-search-button": "Go",
"links-applications-title": "Applications",
+1 -1
View File
@@ -16,7 +16,7 @@ import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import data from "../../data/collections.json";
import { setSearch, getSearchObj } from "../store/search/action";
import { setSearch, getSearchObj } from "../../store/search/action";
import {
setSearchResults,
setSearchDetails,
+1 -1
View File
@@ -193,7 +193,7 @@ let Home = (props) => {
return <WayleaveForm props={props} />;
default:
return <Blank />;
return <HouseholderAppealHasForm props={props} />;
}
re;
};