import { Avatar, Box, Flex, Heading, HStack, MetaTag, Text, VStack, Wrap, WrapItem, } from '@metafam/ds'; import { MetaLink } from 'components/Link'; import { PlayerContacts } from 'components/Player/PlayerContacts'; import { PlayerFragmentFragment } from 'graphql/autogen/types'; import { SkillColors } from 'graphql/types'; import React from 'react'; import { getPlayerCoverImage, getPlayerImage, getPlayerName, } from 'utils/playerHelpers'; type Props = { player: PlayerFragmentFragment; }; const SHOW_MEMBERSHIPS = 4; const SHOW_SKILLS = 4; export const PlayerTile: React.FC = ({ player }) => { return ( {getPlayerName(player)} {player.playerType?.title ? ( {player.playerType?.title.toUpperCase()} ) : null} {player.rank && ( {player.rank} )} XP: {Math.floor(player.total_xp)} {player.box_profile?.description ? ( ABOUT {player.box_profile.description} ) : null} {player.Player_Skills.length ? ( SKILLS {player.Player_Skills.slice(0, SHOW_SKILLS).map(({ Skill }) => ( {Skill.name} ))} {player.Player_Skills.length > SHOW_SKILLS && ( {`+${player.Player_Skills.length - SHOW_SKILLS}`} )} ) : null} {player.daohausMemberships.length ? ( MEMBER OF {player.daohausMemberships .slice(0, SHOW_MEMBERSHIPS) .map((member) => ( {member.moloch.title} ))} {player.daohausMemberships.length > SHOW_MEMBERSHIPS && ( {`+${player.daohausMemberships.length - SHOW_MEMBERSHIPS}`} )} ) : null} {player.Accounts.length ? ( CONTACT ) : null} ); };