From 15faed97d836dbaa5fc52b14dc324b8dfdfe3d96 Mon Sep 17 00:00:00 2001 From: Tewson Seeoun Date: Tue, 9 Apr 2024 18:56:03 +0100 Subject: [PATCH] Add party to area pages --- src/pages/areas/[localAuthority]/[area].astro | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/pages/areas/[localAuthority]/[area].astro b/src/pages/areas/[localAuthority]/[area].astro index 1f28888..b518078 100644 --- a/src/pages/areas/[localAuthority]/[area].astro +++ b/src/pages/areas/[localAuthority]/[area].astro @@ -62,6 +62,10 @@ export async function getStaticPaths() { answerRecord, "Candidate full name" ); + const candidatePartyName = getLookupFieldValue( + answerRecord, + "Candidate party name" + ); const candidateProfilePictureUrl = getOptionalLookupFieldValue( answerRecord, "Candidate profile picture" @@ -69,6 +73,7 @@ export async function getStaticPaths() { const answer = getStringFieldValue(answerRecord, "Text"); return { candidateFullName, + candidatePartyName, candidateProfilePictureUrl, answer, }; @@ -131,13 +136,16 @@ const { showName={false} /> -

- - {answer.candidateFullName} - -

+
+

+ + {answer.candidateFullName} + +

+

{answer.candidatePartyName}

+