From be347143f1dfee3c341355dcfcc5e92006f4f08f Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 9 Sep 2024 18:05:21 +0100 Subject: [PATCH] minor tweaks --- src/app/components/StatusBadge.tsx | 2 +- .../building-passport/[propertyId]/energy-assessment/page.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/components/StatusBadge.tsx b/src/app/components/StatusBadge.tsx index 0999b1e..938f135 100644 --- a/src/app/components/StatusBadge.tsx +++ b/src/app/components/StatusBadge.tsx @@ -65,7 +65,7 @@ const statusColor: { propertyHoverText: "This property is currently in the assessment stage", }, survey: { - class: "bg-emerald-500 hover:bg-emerald-500", + class: "bg-brandblue hover:bg-hoverblue", text: "survey", hoverText: "This portfolio is currently in the survey stage", propertyHoverText: "This property is currently in the survey stage", diff --git a/src/app/portfolio/[slug]/building-passport/[propertyId]/energy-assessment/page.tsx b/src/app/portfolio/[slug]/building-passport/[propertyId]/energy-assessment/page.tsx index 871f9b0..4522de8 100644 --- a/src/app/portfolio/[slug]/building-passport/[propertyId]/energy-assessment/page.tsx +++ b/src/app/portfolio/[slug]/building-passport/[propertyId]/energy-assessment/page.tsx @@ -71,7 +71,9 @@ export default async function EnergyAssessmentsPage({ const propertyMeta = await getPropertyMeta(params.propertyId); const ea = await getEnergyAssessment(propertyMeta.uprn); - if (!ea) { + // ea will be an empty object {} if there is no energy assessment + + if (Object.keys(ea).length === 0) { return (