mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-02-08 21:15:05 -05:00
* added data for personality types and refactored images * setup personality type * setup player type * player types descriptions
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { Button } from '@metafam/ds';
|
|
import { PlayerFragmentFragment } from 'graphql/autogen/types';
|
|
import React from 'react';
|
|
import { FaGithub, FaTwitter } from 'react-icons/fa';
|
|
|
|
type Props = {
|
|
player: PlayerFragmentFragment;
|
|
};
|
|
|
|
export const PlayerContacts: React.FC<Props> = ({ player }) => {
|
|
return (
|
|
<>
|
|
{player.Accounts.map((acc) => {
|
|
if (acc.type === 'TWITTER') {
|
|
const link = `https://twitter.com/${acc.identifier}`;
|
|
return (
|
|
<Button
|
|
as="a"
|
|
href={link}
|
|
target="_blank"
|
|
key={link}
|
|
size="xs"
|
|
colorScheme="twitter"
|
|
leftIcon={<FaTwitter />}
|
|
>
|
|
{acc.identifier}
|
|
</Button>
|
|
);
|
|
}
|
|
if (acc.type === 'GITHUB') {
|
|
const link = `https://github.com/${acc.identifier}`;
|
|
return (
|
|
<Button
|
|
as="a"
|
|
href={link}
|
|
target="_blank"
|
|
key={link}
|
|
size="xs"
|
|
colorScheme="blackAlpha"
|
|
backgroundColor="black"
|
|
leftIcon={<FaGithub />}
|
|
>
|
|
{acc.identifier}
|
|
</Button>
|
|
);
|
|
}
|
|
return null;
|
|
})}
|
|
</>
|
|
);
|
|
};
|