roster bars link to user page

This commit is contained in:
Kalle (Sendou)
2021-02-04 20:41:49 +02:00
parent a4e4c96128
commit 67a527d26c

View File

@@ -1,4 +1,5 @@
import { Box, Center, Flex } from "@chakra-ui/react";
import MyLink from "components/common/MyLink";
import UserAvatar from "components/common/UserAvatar";
import WeaponImage from "components/common/WeaponImage";
import { getEmojiFlag } from "countries-list";
@@ -14,13 +15,15 @@ const RosterPlayerBar: React.FC<Props> = ({ user }) => {
const { secondaryBgColor, themeColorHex } = useMyTheme();
return (
<>
<UserAvatar
user={user}
size="lg"
borderRadius={0}
w={[8, null, 12]}
h={[8, null, 12]}
/>
<MyLink href={`/u/${user.discordId}`}>
<UserAvatar
user={user}
size="lg"
borderRadius={0}
w={[8, null, 12]}
h={[8, null, 12]}
/>
</MyLink>
<Flex
bg={secondaryBgColor}
h={[8, null, 12]}
@@ -34,21 +37,24 @@ const RosterPlayerBar: React.FC<Props> = ({ user }) => {
</Center>
))}
</Flex>
<Flex
h={[8, null, 12]}
bg={themeColorHex}
align="center"
justify="center"
textColor="black"
textTransform="uppercase"
letterSpacing="wider"
lineHeight="1rem"
fontWeight="medium"
fontSize="sm"
>
{user.username}#{user.discriminator}{" "}
{user.profile?.country ? getEmojiFlag(user.profile.country) : ""}
</Flex>
<MyLink href={`/u/${user.discordId}`}>
<Flex
h={[8, null, 12]}
bg={themeColorHex}
align="center"
justify="center"
textColor="black"
textTransform="uppercase"
letterSpacing="wider"
lineHeight="1rem"
fontWeight="medium"
fontSize="sm"
>
{user.username}#{user.discriminator}{" "}
{user.profile?.country ? getEmojiFlag(user.profile.country) : ""}
</Flex>
</MyLink>
<Box display={["block", "none"]} />
<Flex
bg={secondaryBgColor}