diff --git a/src/components/CommunityCard.astro b/src/components/CommunityCard.astro index 88a9224..03d2750 100644 --- a/src/components/CommunityCard.astro +++ b/src/components/CommunityCard.astro @@ -6,13 +6,14 @@ interface Props { description?: string; bluesky?: string; website?: string; + avatar?: string; } -const { name, handle, location, description, bluesky, website } = Astro.props; +const { name, handle, location, description, bluesky, website, avatar } = Astro.props; -// Generate initials from the handle for the colored circle +// Generate initials from the handle for the colored circle (fallback when no avatar) const abbr = handle - .replace(/\.(bsky\.social|atproto\.camp|atprotocol\.community)$/, '') + .replace(/\.(bsky\.social|atproto\.camp|atprotocol\.community|atprotocol\.space)$/, '') .replace(/^atproto\.?/, '') .slice(0, 3) .toUpperCase(); @@ -27,9 +28,13 @@ function handleColor(h: string): string { ---
{c.description}
}