import { IconButton, MetaTileLinkWrapper, Wrap, WrapItem } from '@metafam/ds'; import { FaGithub, FaTwitter } from 'react-icons/fa'; import { linkButtonProps } from '#components/Guild/Section/GuildLinks'; import { Player } from '#graphql/autogen/hasura-sdk'; import { PlayerBrightId } from './Section/PlayerBrightId'; type Props = { player: Player; disableBrightId?: boolean; }; export const PlayerContacts: React.FC = ({ player, disableBrightId = true, // TODO: enable after fixing issue #1068 }) => ( {player?.accounts?.map((acc) => { switch (acc.type) { case 'TWITTER': { const link = `https://twitter.com/${acc.identifier}`; return ( { e.preventDefault(); if (link) window?.open(link, '_blank')?.focus(); }} aria-label="Twitter" title={`Twitter: ${acc.identifier}`} icon={} minW={6} w={6} h={6} borderRadius="full" {...linkButtonProps} /> ); } case 'GITHUB': { const link = `https://github.com/${acc.identifier}`; return ( { e.preventDefault(); if (link) window?.open(link, '_blank')?.focus(); }} aria-label="GitHub" title={`Github: ${acc.identifier}`} icon={} minW={6} w={6} h={6} borderRadius="full" {...linkButtonProps} /> ); } default: { return null; } } })} {!disableBrightId && ( )} );