mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-02-08 21:15:05 -05:00
* fixed update token on address change * fetching already set profile data in setup flow * select skills colors * showing more data on player tile * rename variables
53 lines
1.7 KiB
TypeScript
53 lines
1.7 KiB
TypeScript
import { Container, Divider, MetaTag, Wrap } from '@metafam/ds';
|
|
import { PlayerFeature } from 'components/Player/PlayerFeature';
|
|
import { PlayerFragmentFragment } from 'graphql/autogen/types';
|
|
import React from 'react';
|
|
|
|
type Props = { player: PlayerFragmentFragment };
|
|
|
|
export const PlayerFeatures: React.FC<Props> = ({ player }) => {
|
|
return (
|
|
<Container maxW="xl">
|
|
<Wrap
|
|
spacing="8"
|
|
ml={{ base: '4', lg: '64' }}
|
|
pt={{ base: '4', md: '12', lg: 0 }}
|
|
>
|
|
<PlayerFeature
|
|
title="XP"
|
|
value={Math.floor(player.totalXp).toString()}
|
|
/>
|
|
<Divider orientation="vertical" color="whiteAlpha.400" />
|
|
<PlayerFeature title="Rank">
|
|
<MetaTag
|
|
backgroundColor={player.rank?.toLowerCase()}
|
|
size="md"
|
|
color="blackAlpha.600"
|
|
>
|
|
{player.rank}
|
|
</MetaTag>
|
|
</PlayerFeature>
|
|
<Divider orientation="vertical" color="whiteAlpha.400" />
|
|
{player.box_profile?.location && (
|
|
<PlayerFeature
|
|
title="Location"
|
|
value={player.box_profile?.location}
|
|
/>
|
|
)}
|
|
<Divider orientation="vertical" color="whiteAlpha.400" />
|
|
{/* <PlayerFeature title="Role" value="N/A" color="whiteAlpha.500" /> */}
|
|
{/* <Divider orientation="vertical" color="whiteAlpha.400" /> */}
|
|
<PlayerFeature
|
|
title="Availability"
|
|
value={
|
|
player.availability_hours != null
|
|
? `${player.availability_hours} hr / week`
|
|
: 'N/A'
|
|
}
|
|
color={player.availability_hours ? undefined : 'whiteAlpha.500'}
|
|
/>
|
|
</Wrap>
|
|
</Container>
|
|
);
|
|
};
|