diff options
| author | Eugene Sokolov <eug-vs@keemail.me> | 2020-08-11 23:17:28 +0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-11 23:17:28 +0300 | 
| commit | 94067ef2a0d9ac5c2aa5f45eca5366a2251ac04a (patch) | |
| tree | 51e502c7d1be7c8ad2179daf2f5c9bfd27911636 /src/containers | |
| parent | c6723fa8a2a303f356b1756b45b2190203c96582 (diff) | |
| parent | b5ce9be31993f5b4bee9abbe57d775b7ea407507 (diff) | |
| download | which-ui-94067ef2a0d9ac5c2aa5f45eca5366a2251ac04a.tar.gz | |
Merge pull request #76 from which-ecosystem/redesign
Initial header redesign
Diffstat (limited to 'src/containers')
| -rw-r--r-- | src/containers/Page/Page.tsx | 2 | ||||
| -rw-r--r-- | src/containers/Profile/ProfileInfo.tsx | 11 | 
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  |