diff --git a/src/components/CandidateAvatar.astro b/src/components/CandidateAvatar.astro
index 05a4773..ef6cb54 100644
--- a/src/components/CandidateAvatar.astro
+++ b/src/components/CandidateAvatar.astro
@@ -6,9 +6,10 @@ import Link from "./Link.astro";
interface Props {
candidateFullName: string;
profilePictureUrl?: string;
+ showName?: boolean;
}
-const { candidateFullName, profilePictureUrl } = Astro.props;
+const { candidateFullName, profilePictureUrl, showName = true } = Astro.props;
const srcUrl = profilePictureUrl
? `https://i0.wp.com/dublininquirer.com${new URL(profilePictureUrl).pathname}?resize=64%2C64&ssl=1`
: "data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";
@@ -17,8 +18,10 @@ const srcUrl = profilePictureUrl

-
- {candidateFullName}
-
+ {
+ showName ? (
+
{candidateFullName}
+ ) : null
+ }
diff --git a/src/pages/candidates/[candidate].astro b/src/pages/candidates/[candidate].astro
index 396cfa3..d67ede9 100644
--- a/src/pages/candidates/[candidate].astro
+++ b/src/pages/candidates/[candidate].astro
@@ -5,6 +5,7 @@ import { marked } from "marked";
import {
airtableClient,
getLookupFieldValue,
+ getOptionalStringFieldValue,
getStringFieldValue,
} from "../../airtable-api";
import Layout from "../../layouts/Layout.astro";
@@ -13,6 +14,7 @@ import HeaderTitle from "../../components/HeaderTitle.astro";
import HeaderSubtitle from "../../components/HeaderSubtitle.astro";
import QuestionText from "../../components/QuestionText.astro";
import Link from "../../components/Link.astro";
+import CandidateAvatar from "../../components/CandidateAvatar.astro";
export async function getStaticPaths() {
const candidates = await airtableClient("Candidates")
@@ -40,6 +42,10 @@ export async function getStaticPaths() {
candidateRecord,
"Area local authority name"
);
+ const candidateProfilePictureUrl = getOptionalStringFieldValue(
+ candidateRecord,
+ "Profile picture"
+ );
const questions = questionRecords
.filter(
@@ -73,6 +79,7 @@ export async function getStaticPaths() {
candidateFullName,
candidateAreaName,
candidateAreaLocalAuthorityName,
+ candidateProfilePictureUrl,
questions,
hasAnswers,
},
@@ -84,6 +91,7 @@ const {
candidateFullName,
candidateAreaName,
candidateAreaLocalAuthorityName,
+ candidateProfilePictureUrl,
questions,
hasAnswers,
} = Astro.props;
@@ -91,6 +99,13 @@ const {
+
+
+
{candidateFullName}
Candidate for