From fc560026d16566cb0626b5091dcd12b4f708e866 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sun, 18 Oct 2020 13:34:19 +0300 Subject: [PATCH] new profile look --- components/Section.tsx | 17 +++++++ scenes/Profile/components/AvatarWithInfo.tsx | 48 +++++++++++++------- 2 files changed, 48 insertions(+), 17 deletions(-) create mode 100644 components/Section.tsx diff --git a/components/Section.tsx b/components/Section.tsx new file mode 100644 index 000000000..10b04bd99 --- /dev/null +++ b/components/Section.tsx @@ -0,0 +1,17 @@ +import { Box, BoxProps } from "@chakra-ui/core"; +import { useMyTheme } from "lib/useMyTheme"; + +const Section: React.FC = (props) => { + const { secondaryBgColor } = useMyTheme(); + return ( + + ); +}; + +export default Section; diff --git a/scenes/Profile/components/AvatarWithInfo.tsx b/scenes/Profile/components/AvatarWithInfo.tsx index 8de48de11..d3d3e062c 100644 --- a/scenes/Profile/components/AvatarWithInfo.tsx +++ b/scenes/Profile/components/AvatarWithInfo.tsx @@ -1,5 +1,6 @@ import { Avatar, Box, Flex, Heading, IconButton } from "@chakra-ui/core"; import Flag from "components/Flag"; +import Section from "components/Section"; import WeaponImage from "components/WeaponImage"; import { GetUserByIdentifierQuery } from "generated/graphql"; import { useTranslation } from "lib/useMockT"; @@ -30,24 +31,31 @@ const AvatarWithInfo: React.FC = ({ user }) => { return ( <> - +
- - + + {user.fullUsername} {user.profile?.country && } - - + + {user.profile?.twitterName && ( = ({ user }) => { /> )} + {user.profile?.weaponPool.length && ( + + {user.profile.weaponPool.map((wpn) => ( + + + + ))} + + )} {user.profile?.sensStick && (!!user.profile.sensStick || user.profile.sensStick === 0) && ( @@ -99,19 +122,10 @@ const AvatarWithInfo: React.FC = ({ user }) => { )} )} - {user.profile?.weaponPool.length && ( - - {user.profile.weaponPool.map((wpn) => ( - - - - ))} - - )} - +
); };