Files
TheGame/packages/web/components/Guild/GuildLinks.tsx
Hammad Jutt 7492ae5bd6 Remove unused pages / components and fix usage of Wrap with WrapItem (#284)
* Remove unused pages / components

* Add WrapItem around components inside Wrap component

New version of Chakra requires WrapItem around any components that have Wrap

* Update LoginButton to link to own profile and show Avatar (#285)

* Update LoginButton to link to own profile and show Avatar

* Change SetupUsername to explicitly mention "username"
2021-01-18 11:44:52 -07:00

45 lines
1.0 KiB
TypeScript

import { Button, Wrap, WrapItem } from '@metafam/ds';
import { GuildFragmentFragment } from 'graphql/autogen/types';
import React from 'react';
import { FaDiscord, FaGlobe } from 'react-icons/fa';
type Props = {
guild: GuildFragmentFragment;
};
export const GuildLinks: React.FC<Props> = ({ guild }) => {
return (
<Wrap>
{guild.website_url ? (
<WrapItem>
<Button
as="a"
href={guild.website_url}
target="_blank"
size="xs"
colorScheme="blackAlpha"
leftIcon={<FaGlobe />}
>
Website
</Button>
</WrapItem>
) : null}
{guild.discord_invite_url ? (
<WrapItem>
<Button
as="a"
href={guild.discord_invite_url}
target="_blank"
size="xs"
bgColor="discord"
_hover={{ bgColor: 'discordDark' }}
leftIcon={<FaDiscord />}
>
Discord
</Button>
</WrapItem>
) : null}
</Wrap>
);
};