link to free agent post

This commit is contained in:
Kalle (Sendou)
2021-01-09 01:06:17 +02:00
parent fe13ba86c0
commit 7a1644690d
4 changed files with 96 additions and 41 deletions

View File

@@ -20,7 +20,7 @@ import useUser from "lib/useUser";
import { GetUserByIdentifierData } from "prisma/queries/getUserByIdentifier";
import { FaGamepad, FaTwitch, FaTwitter, FaYoutube } from "react-icons/fa";
import { FiInfo } from "react-icons/fi";
import { RiTrophyLine } from "react-icons/ri";
import { RiFileTextLine, RiTrophyLine } from "react-icons/ri";
interface AvatarWithInfoProps {
user: NonNullable<GetUserByIdentifierData>;
@@ -181,18 +181,41 @@ const AvatarWithInfo: React.FC<AvatarWithInfoProps> = ({
</Flex>
</>
)}
<Box width="100%" textAlign="center" mt={4}>
<Flex
width="100%"
alignItems="center"
justifyContent="center"
mt={4}
>
{!!user.player?.switchAccountId && (
<MyLink
href={`/player/${user.player?.switchAccountId}`}
prefetch={true}
>
<Button leftIcon={<RiTrophyLine />} variant="outline">
<Button
leftIcon={<RiTrophyLine />}
variant="outline"
mx={2}
>
<Trans>View results</Trans>
</Button>
</MyLink>
)}
</Box>
{!!user.freeAgentPost?.id && (
<MyLink
href={`/freeagents?id=${user.freeAgentPost.id}`}
prefetch={true}
>
<Button
leftIcon={<RiFileTextLine />}
variant="outline"
mx={2}
>
<Trans>View free agent post</Trans>
</Button>
</MyLink>
)}
</Flex>
<Top500HelpText />
</Flex>
</Flex>