aboutsummaryrefslogtreecommitdiff
path: root/src/containers
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/Page/Page.tsx2
-rw-r--r--src/containers/Profile/ProfileInfo.tsx11
2 files changed, 8 insertions, 5 deletions
diff --git a/src/containers/Page/Page.tsx b/src/containers/Page/Page.tsx
index 643e6de..f6a0aa5 100644
--- a/src/containers/Page/Page.tsx
+++ b/src/containers/Page/Page.tsx
@@ -16,7 +16,7 @@ const Notifications = React.lazy(() => import('../Notifications/Notifications'))
const useStyles = makeStyles(theme => ({
root: {
[theme.breakpoints.down('sm')]: {
- margin: theme.spacing(2, 0, 12, 0)
+ margin: theme.spacing(15, 0, 12, 0)
},
[theme.breakpoints.up('md')]: {
margin: theme.spacing(15, 5, 8, 5)
diff --git a/src/containers/Profile/ProfileInfo.tsx b/src/containers/Profile/ProfileInfo.tsx
index 9eee4c1..a01c222 100644
--- a/src/containers/Profile/ProfileInfo.tsx
+++ b/src/containers/Profile/ProfileInfo.tsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import { Avatar, Badge, Typography } from '@material-ui/core/';
+import { 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';
@@ -8,9 +8,11 @@ import Skeleton from '@material-ui/lab/Skeleton';
import MoreMenu from './MoreMenu';
import Highlight from './Highlight';
import UploadImage from '../../components/UploadImage/UploadImage';
+import Avatar from '../../components/Avatar/Avatar';
import { patch } from '../../requests';
import { useAuth } from '../../hooks/useAuth';
+
interface PropTypes {
savedPolls: number;
totalVotes: number;
@@ -116,19 +118,20 @@ const ProfileInfo: React.FC<PropTypes> = ({
vertical: 'bottom',
horizontal: 'right'
}}
+ onClick={handleClick}
badgeContent={(
<div className={classes.badge}>
- <CameraAltIcon onClick={handleClick} />
+ <CameraAltIcon />
</div>
)}
>
- <Avatar className={classes.avatar} src={userInfo?.avatarUrl} />
+ <Avatar className={classes.avatar} user={userInfo} />
</Badge>
</div>
<UploadImage isOpen={input} setIsOpen={setInput} callback={patchAvatar} />
</div>
)
- : <Avatar className={classes.avatar} src={userInfo?.avatarUrl} />
+ : <Avatar className={classes.avatar} user={userInfo} />
}
{
!userInfo