Skip to content

Commit 1900a8f

Browse files
Use the comittee member's name in their photo's alt-text if available
1 parent 4e03837 commit 1900a8f

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

client/src/pages/about.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ export default function AboutPage() {
6363
</>
6464
);
6565

66-
function committeeImage(profilePic: string) {
66+
function committeeImage(profilePic: string, name: string) {
6767
return (
6868
<div className="relative h-[8.75rem] w-[8.25rem] overflow-hidden">
6969
<Image
7070
src={profilePic === null ? "/landing_placeholder.png" : profilePic}
71-
alt="Placeholder Picture"
71+
alt={name === null ? "Placeholder Picture" : name}
7272
fill
7373
className="object-cover object-center"
7474
/>
@@ -81,10 +81,16 @@ export default function AboutPage() {
8181
<>
8282
<div className="relative flex h-56 w-56 items-center justify-center bg-[url('/pixel-art-frame.svg')] bg-contain bg-center bg-no-repeat">
8383
{committeeMember.pk === 0 ? (
84-
committeeImage(committeeMember.profile_picture)
84+
committeeImage(
85+
committeeMember.profile_picture,
86+
committeeMember.name,
87+
)
8588
) : (
8689
<Link href={`/members/${committeeMember.pk}`}>
87-
{committeeImage(committeeMember.profile_picture)}
90+
{committeeImage(
91+
committeeMember.profile_picture,
92+
committeeMember.name,
93+
)}
8894
</Link>
8995
)}
9096
</div>

0 commit comments

Comments
 (0)