mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
This is being merged for further testing so as to not block the progress of `develop` & not require more rebases.
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import { Box, Heading, HStack, Link, Text } from '@metafam/ds';
|
|
import { PlayerAvatar } from 'components/Player/PlayerAvatar';
|
|
import { GuildPlayer } from 'graphql/types';
|
|
import React from 'react';
|
|
import { getPlayerName, getPlayerURL } from 'utils/playerHelpers';
|
|
|
|
type GuildPlayerProps = {
|
|
player: GuildPlayer;
|
|
};
|
|
|
|
export const GuildPlayerComponent: React.FC<GuildPlayerProps> = ({
|
|
player,
|
|
}) => (
|
|
<Link
|
|
role="group"
|
|
_hover={{ textDecoration: 'none' }}
|
|
href={getPlayerURL(player)}
|
|
>
|
|
<HStack alignItems="center" mb={6}>
|
|
<PlayerAvatar w={16} h={16} mr={6} {...{ player }} />
|
|
<Box>
|
|
<Heading
|
|
_groupHover={{ textDecoration: 'underline' }}
|
|
fontWeight="bold"
|
|
textTransform="uppercase"
|
|
fontSize="xs"
|
|
color="white"
|
|
mb="1"
|
|
>
|
|
{getPlayerName(player)}
|
|
</Heading>
|
|
<HStack alignItems="center">
|
|
<Text fontSize="xs">{(player as GuildPlayer).role}</Text>
|
|
</HStack>
|
|
</Box>
|
|
</HStack>
|
|
</Link>
|
|
);
|