Error
++ {statusCode + ? `An error ${statusCode} occurred on server` + : "An error occurred on the client"} +
+ + Go back home + +diff --git a/components/dns/homepage/titleContent.js b/components/dns/homepage/titleContent.js index 5950efad..5c1a3086 100644 --- a/components/dns/homepage/titleContent.js +++ b/components/dns/homepage/titleContent.js @@ -1,12 +1,89 @@ import Link from "next/link"; +import { useState } from "react"; import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; +import AutoSuggest from "react-autosuggest"; + +const dnsSites = [ + { id: 1, name: "30MW Energy Plant - Wrexham" }, + { id: 1, name: "Abertillery Wind Farm" }, + { id: 1, name: "Alaw Mon Solar Farm" }, + { id: 1, name: "Alwen Forest - Wind" }, + { id: 1, name: "Blackberry Lane Solar Park" }, + { id: 1, name: "Bretton Hall Solar Farm" }, + { id: 1, name: "Brynllewelyn Farm - Renewable Energy Project" }, + { id: 1, name: "Brynrhyd Solar Farm" }, + { id: 1, name: "Brynwell Farm Renewable Energy Hub" }, + { id: 1, name: "Buttington Quarry - ERF" }, + { id: 1, name: "Coed Darcy - STOR" }, + { id: 1, name: "Coity Road - STOR" }, + { id: 1, name: "Craig Y Perchyll Solar" }, + { id: 1, name: "Egnedol - Sustainable Energy" }, + { id: 1, name: "Elwy Solar Energy" }, + { id: 1, name: "Erebus - Floating Offshore Wind Demonstration Project" }, + { id: 1, name: "Felindre Road - STOR" }, + { id: 1, name: "Gaerwen Wind Farm" }, + { id: 1, name: "Garn Fach Wind Farm" }, + { id: 1, name: "Holyhead Harbour Revision Order" }, + { id: 1, name: "Holyhead Marina Harbour Revision Order" }, + { id: 1, name: "Holyhead Waterfront Regeneration Scheme HRO" }, + { id: 1, name: "Legacy Substation Gas Peaking Plant" }, + { id: 1, name: "Llantarnam - SToR" }, + { id: 1, name: "Llanwern - Solar" }, + { id: 1, name: "Lluest y Gwynt Wind Farm" }, + { id: 1, name: "Llynfi Energy Recovery Facility" }, + { id: 1, name: "Manmoel Wind Farm" }, + { id: 1, name: "Môn Solar Farm" }, + { id: 1, name: "Mor Hafren: Energy Recovery Facility" }, + { id: 1, name: "Mynydd Carn-y-Cefn Wind Farm" }, + { id: 1, name: "Mynydd Llanhilleth Wind Farm" }, + { id: 1, name: "Pancross & Oaklands Solar Farm" }, + { id: 1, name: "Parc Dyffryn Solar Park" }, + { id: 1, name: "Parc Solar Traffwll" }, + { id: 1, name: "Pen March Wind Farm" }, + { id: 1, name: "Pen-y-Fan - Power Plant" }, + { id: 1, name: "Pencaerlan Solar Farm" }, + { id: 1, name: "Penderi Solar Farm" }, + { id: 1, name: "Penpergwm Solar Farm" }, + { id: 1, name: "Pentre Bach Solar Farm" }, + { id: 1, name: "Plas Power Estate Solar Farm" }, + { id: 1, name: "Project Valorous" }, + { id: 1, name: "Rhoscrowther Wind Farm" }, + { id: 1, name: "Rush Wall Solar Park Ltd" }, + { id: 1, name: "Sudbrook - Peaking Gas" }, + { id: 1, name: "TWA - Morlais Demonstration Zone" }, + { id: 1, name: "Twyn Hywel Energy Park" }, + { id: 1, name: "Tycroes Solar" }, + { id: 1, name: "Upper Ogmore - Wind Turbines" }, + { id: 1, name: "Valero - Cogeneration Facility" }, + { id: 1, name: "Vattenfall - Renewable Energy" }, + { id: 1, name: "Wauntysswg - Solar" }, + { id: 1, name: "Wentlooge - renewable energy hub" }, + { id: 1, name: "Y Bryn Wind Farm" }, +]; + +const lowerCasedCompanies = dnsSites.map((company) => { + return { + id: company.id, + name: company.name, + }; +}); const TitleContent = (props) => { let { t } = useTranslation(); const router = useRouter(); const { locale } = router; + + const [value, setValue] = useState(""); + const [suggestions, setSuggestions] = useState([]); + + function getSuggestions(value) { + return lowerCasedCompanies.filter((company) => + company.name.toLowerCase().includes(value.trim().toLowerCase()) + ); + } + return (
- An error.... - {statusCode - ? `An error ${statusCode} occurred on server` - : "An error occurred on client"} -
++ {statusCode + ? `An error ${statusCode} occurred on server` + : "An error occurred on the client"} +
+ + Go back home + ++
{" "}
The Planning Inspectorate
@@ -57,7 +57,7 @@ const Home = (props) => {
+
{" "} If you are contacting us regarding a Development of National Significance, please use the following details:
-+
Tel: 03034 445 940
E-mail:{" "}
@@ -91,12 +91,12 @@ const Home = (props) => {
@PINSgov
+
Further information about contacting the Planning Inspectorate customer services can be viewed on GOV.Wales.
-+
The Planning Inspectorate gives advice about applying for a Development of National Significance or making representations about an @@ -110,7 +110,7 @@ const Home = (props) => { the information any longer than is necessary. See our Privacy notice on GOV.UK.
-+
You should note that we have a policy commitment to openness and transparency and you should not provide us with confidential or commercial @@ -118,7 +118,7 @@ const Home = (props) => { the public domain.
+
The Planning Inspectorate aims to provide the best possible service for its customers. We try hard to ensure that everyone is satisfied with @@ -130,11 +130,11 @@ const Home = (props) => { contact details are on GOV.Wales.
+
If you are a journalist please contact our press office directly:{" "}
-+
Telephone:{" "} 0303 444 5004 or{" "} 0303 444 5005{" "} diff --git a/pages/dns/index.js b/pages/dns/index.js index 86e8ce54..831920ac 100644 --- a/pages/dns/index.js +++ b/pages/dns/index.js @@ -20,23 +20,27 @@ const Home = (props) => { const router = useRouter(); const { locale } = router; - - return ( -