diff --git a/packages/web/docs/src/components/community-section.tsx b/packages/web/docs/src/components/community-section.tsx index bd7163dc90..d0f0ec7dec 100644 --- a/packages/web/docs/src/components/community-section.tsx +++ b/packages/web/docs/src/components/community-section.tsx @@ -73,7 +73,7 @@ export function CommunitySection({ className }: { className?: string }) { {Array.from({ length: 4 }).map((_, i) => (
@@ -138,6 +138,10 @@ const tempSocialPosts: SocialPost[] = Array.from({ length: 10 }) })); function SocialPostCard({ post }: { post: SocialPost }) { + const isDiscordLink = post.href.startsWith('https://discordapp.com/'); + const isGitHubLink = post.href.startsWith('https://github.com/'); + const isTwitterLink = post.href.startsWith('https://twitter.com/'); + return (
@@ -146,16 +150,14 @@ function SocialPostCard({ post }: { post: SocialPost }) { className="absolute -left-1.5 -top-1.5 rounded-full border-2 border-transparent p-[5px] text-white hover:border-white" href={post.href} style={{ - backgroundColor: post.href.startsWith('https://discordapp.com') - ? '#5865F2' - : '#222530', + backgroundColor: isDiscordLink ? '#5865F2' : '#222530', }} > - {post.href.startsWith('https://github.com') ? ( + {isGitHubLink ? ( - ) : post.href.startsWith('https://discordapp.com') ? ( + ) : isDiscordLink ? ( - ) : post.href.startsWith('https://twitter.com') ? ( + ) : isTwitterLink ? ( ) : (