From afa2df1f9e21e8e786d1bda74d367974ca541cdb Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Mon, 6 Nov 2023 12:39:49 +0100 Subject: [PATCH] property site address is optional --- src/templates/html/application/ApplicationHTML.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/templates/html/application/ApplicationHTML.tsx b/src/templates/html/application/ApplicationHTML.tsx index 938c0ec6..beb8d45d 100644 --- a/src/templates/html/application/ApplicationHTML.tsx +++ b/src/templates/html/application/ApplicationHTML.tsx @@ -33,7 +33,7 @@ function Highlights(props: { data: PlanXExportData[] }): JSX.Element {
Property address
- {[siteAddress.address_1, siteAddress.town, siteAddress.postcode] + {[siteAddress?.address_1, siteAddress?.town, siteAddress?.postcode] .filter(Boolean) .join(" ")}
@@ -89,6 +89,7 @@ function Result(props: { data: PlanXExportData[] }): JSX.Element { function AboutTheProperty(props: { data: PlanXExportData[] }): JSX.Element { const siteAddress = props.data.find((d) => d.question === "site") ?.responses as BOPSFullPayload["site"]; + return (

About the property

@@ -96,7 +97,7 @@ function AboutTheProperty(props: { data: PlanXExportData[] }): JSX.Element {
Address
- {[siteAddress.address_1, siteAddress.town, siteAddress.postcode] + {[siteAddress?.address_1, siteAddress?.town, siteAddress?.postcode] .filter(Boolean) .join(" ")}
@@ -110,7 +111,7 @@ function AboutTheProperty(props: { data: PlanXExportData[] }): JSX.Element {
Coordinate (lng, lat)
- {siteAddress.longitude}, {siteAddress.latitude} + {siteAddress?.longitude}, {siteAddress?.latitude}
{""}