diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-28 04:01:32 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-28 04:01:32 +0300 |
commit | b02ebbcb75faceb140d484c4a3a6779040ba0ca7 (patch) | |
tree | 10bf6a0d86b35af9e781290d8ecfa459eae96ac0 /src | |
parent | 64d58182cf5bc509af8ab1fa3fa57f30b46d6501 (diff) | |
download | which-ui-b02ebbcb75faceb140d484c4a3a6779040ba0ca7.tar.gz |
feat: add missing verified icon to profileInfo
Diffstat (limited to 'src')
-rw-r--r-- | src/pages/ProfilePage/ProfileInfo.tsx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/pages/ProfilePage/ProfileInfo.tsx b/src/pages/ProfilePage/ProfileInfo.tsx index f52e374..cb6867f 100644 --- a/src/pages/ProfilePage/ProfileInfo.tsx +++ b/src/pages/ProfilePage/ProfileInfo.tsx @@ -1,11 +1,12 @@ import React, { useState } from 'react'; -import { Avatar, Badge } from '@material-ui/core/'; +import { Avatar, Badge, Typography } from '@material-ui/core/'; import { makeStyles } from '@material-ui/core/styles'; import { User } from 'which-types'; import CameraAltIcon from '@material-ui/icons/CameraAlt'; import MoreMenu from './MoreMenu'; import Highlight from './Highlight'; import UploadImage from '../../components/UploadImage/UploadImage'; +import VerifiedIcon from '@material-ui/icons/CheckCircleOutline'; interface PropTypes { @@ -27,9 +28,15 @@ const useStyles = makeStyles(theme => ({ margin: '0 auto' }, name: { - fontSize: 20, - textAlign: 'center', - margin: '10px 0' + margin: theme.spacing(1, 0), + display: 'flex', + alignItems: 'center', + justifyContent: 'center' + }, + verified: { + marginLeft: theme.spacing(0.5), + width: theme.spacing(3), + height: theme.spacing(3) }, profileMenu: { display: 'flex', @@ -110,13 +117,14 @@ const ProfileInfo: React.FC<PropTypes> = ({ ) : <Avatar className={classes.avatar} src={user?.avatarUrl} /> } - <div className={classes.name}> + <Typography variant="h5" className={classes.name}> {user?.username} - </div> + {user?.verified && <VerifiedIcon className={classes.verified} color="primary" />} + </Typography> <div className={classes.profileMenu}> <Highlight text="Polls" value={savedPolls} /> <Highlight text="Since" value={dateSince} /> - <Highlight text="Total" value={totalVotes} /> + <Highlight text="Total votes" value={totalVotes} /> </div> </div> ); |