diff --git a/src/components/MaintainerCard.tsx b/src/components/MaintainerCard.tsx index f727f286..ec995c36 100644 --- a/src/components/MaintainerCard.tsx +++ b/src/components/MaintainerCard.tsx @@ -113,6 +113,80 @@ function LibraryBadge({ library }: { library: Library }) { ) } +const MaintainerSocialIcons: Record< + keyof Maintainer['social'], + React.ReactNode +> = { + twitter: ( + + ), + bluesky: ( + + ), + website: ( + + ), + github: ( + + ), +} + +function MaintainerSocialLinks({ maintainer }: { maintainer: Maintainer }) { + const links = Object.entries({ + github: `https://github.com/${maintainer.github}`, + ...(maintainer.social || {}), + }).map(([key, value]) => { + const Icon = MaintainerSocialIcons[key as keyof Maintainer['social']] + return ( + e.stopPropagation()} + className="hover:text-gray-700 dark:hover:text-gray-200 transition-colors p-2 -mb-2 -ml-2 hover:grayscale-0 hover:scale-110" + > + {Icon} + + ) + }) + + return ( +