From b02ebbcb75faceb140d484c4a3a6779040ba0ca7 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 28 Jun 2020 04:01:32 +0300
Subject: feat: add missing verified icon to profileInfo

---
 src/pages/ProfilePage/ProfileInfo.tsx | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

(limited to 'src/pages/ProfilePage/ProfileInfo.tsx')

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>
   );
-- 
cgit v1.2.3


From ea9920d9ed0e7b3a3e565623e434e75bd3362f02 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 28 Jun 2020 04:12:01 +0300
Subject: feat: close search on clickaway

---
 src/pages/ProfilePage/ProfileInfo.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/pages/ProfilePage/ProfileInfo.tsx')

diff --git a/src/pages/ProfilePage/ProfileInfo.tsx b/src/pages/ProfilePage/ProfileInfo.tsx
index cb6867f..2b9227e 100644
--- a/src/pages/ProfilePage/ProfileInfo.tsx
+++ b/src/pages/ProfilePage/ProfileInfo.tsx
@@ -3,10 +3,10 @@ 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 VerifiedIcon from '@material-ui/icons/CheckCircleOutline';
 import MoreMenu from './MoreMenu';
 import Highlight from './Highlight';
 import UploadImage from '../../components/UploadImage/UploadImage';
-import VerifiedIcon from '@material-ui/icons/CheckCircleOutline';
 
 
 interface PropTypes {
-- 
cgit v1.2.3

