-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,10 @@ export async function getStaticPaths() { | |
return candidates.map((candidateRecord) => { | ||
const candidateFullName = getStringFieldValue(candidateRecord, "Full name"); | ||
const candidateEmail = getOptionalStringFieldValue( | ||
candidateRecord, | ||
"Email" | ||
); | ||
const candidatePartyName = getLookupFieldValue( | ||
candidateRecord, | ||
"Party name" | ||
|
@@ -82,6 +86,7 @@ export async function getStaticPaths() { | |
}, | ||
props: { | ||
candidateFullName, | ||
candidateEmail, | ||
candidatePartyName, | ||
candidateAreaName, | ||
candidateAreaLocalAuthorityName, | ||
|
@@ -95,6 +100,7 @@ export async function getStaticPaths() { | |
const { | ||
candidateFullName, | ||
candidateEmail, | ||
candidatePartyName, | ||
candidateAreaName, | ||
candidateAreaLocalAuthorityName, | ||
|
@@ -136,11 +142,21 @@ const { | |
</> | ||
)) | ||
) : ( | ||
<p> | ||
If you're a voter in this candidate's area and you'd like them to | ||
answer these questions, please email them and tell them this: | ||
<[email protected]>. | ||
</p> | ||
<> | ||
<p class="mb-4"> | ||
{candidateFullName} hasn't yet responded to our questionnaire. If{" "} | ||
{candidateAreaName} is your local electoral area, why not send them | ||
an email reminding them to submit their responses? | ||
</p> | ||
<p> | ||
<a | ||
class="underline" | ||
href={`mailto:${candidateEmail}[email protected]&subject=Dublin Inquirer questionnaire&body=I am a voter in ${candidateAreaName} and I am interested in your responses to the questions on Dublin Inquirer's local election voter guide.`} | ||
> | ||
Email {candidateFullName} | ||
</a> | ||
</p> | ||
</> | ||
) | ||
} | ||
</main> | ||
|