Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1e174ed

Browse files
committedApr 1, 2025·
fix member card.
1 parent 9921e96 commit 1e174ed

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed
 

‎src/components/TeamMemberCard.astro

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { ImageMetadata } from "astro";
33
44
import { Icon } from "astro-icon/components";
5-
import type { SocialsData } from "../lib/socials-transformer";
5+
import type { SocialLinksData } from "@fujocoded/zod-transform-socials";
66
import type { CollectionEntry } from "astro:content";
77
import type { Project } from "../content/config";
88
@@ -12,7 +12,7 @@ interface Props {
1212
avatar: ImageMetadata;
1313
roles: CollectionEntry<"team">["data"]["roles"];
1414
project?: Project | undefined;
15-
contacts: SocialsData[];
15+
contacts: SocialLinksData[];
1616
}
1717
1818
const props = Astro.props;
@@ -39,7 +39,6 @@ const props = Astro.props;
3939
</ul>
4040
) : (
4141
Object.keys(props.roles).map(
42-
// @ts-expect-error
4342
(project: Project) =>
4443
!!props.roles[project].length && (
4544
<li>
@@ -64,19 +63,22 @@ const props = Astro.props;
6463
<ul class:list={{ hidden: props.contacts.length == 0 }} class="contacts">
6564
{
6665
props.contacts.map((contact) => (
67-
<li>
68-
<a href={contact.url}>
69-
{contact.icon ? (
70-
<>
71-
<Icon name={contact.icon} />
72-
</>
73-
) : (
74-
<>
75-
<Icon name={"lucide:home"} />
76-
</>
77-
)}
78-
</a>
79-
</li>
66+
<li>
67+
<a href={contact.url}>
68+
{contact.icon ? (
69+
<>
70+
<Icon name={contact.icon} title={contact.platform} />
71+
</>
72+
) : (
73+
<>
74+
<Icon
75+
name={"lucide:home"}
76+
title={`${props.name}'s website`}
77+
/>
78+
</>
79+
)}
80+
</a>
81+
</li>
8082
))
8183
}
8284
</ul>

0 commit comments

Comments
 (0)
Please sign in to comment.