diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-03-21 18:00:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-21 18:00:45 +0300 |
commit | 8e48a481be6fdcb6c4ff926165379f79a045fe00 (patch) | |
tree | 3e7c1abb50ab4b6f0ee8d08146cae8bd5475e985 /src/components/SolutionCard/SolutionCard.tsx | |
parent | e89a7a79622d25561dc80a8489ae1f6022aebd73 (diff) | |
parent | c708ed105c580ed23bf27b6b5ed1e312ed139f57 (diff) | |
download | chrono-cube-ui-8e48a481be6fdcb6c4ff926165379f79a045fe00.tar.gz |
Merge pull request #49 from eug-vs/githubAvatars
Add fancy avatars from GitHub
Diffstat (limited to 'src/components/SolutionCard/SolutionCard.tsx')
-rw-r--r-- | src/components/SolutionCard/SolutionCard.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/components/SolutionCard/SolutionCard.tsx b/src/components/SolutionCard/SolutionCard.tsx index 5adbff9..7ec8888 100644 --- a/src/components/SolutionCard/SolutionCard.tsx +++ b/src/components/SolutionCard/SolutionCard.tsx @@ -6,7 +6,6 @@ import { CardHeader, CardContent, IconButton, - Avatar, Grid, Menu, MenuItem, @@ -18,6 +17,7 @@ import TimerIcon from '@material-ui/icons/Timer'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import DeleteIcon from '@material-ui/icons/Delete'; +import GithubAvatar from '../GithubAvatar/GithubAvatar'; import { del } from '../../requests'; @@ -77,12 +77,7 @@ const SolutionCard: React.FC<PropTypes> = ({ data, removeThisCard }) => { return ( <Card className={classes.root}> <CardHeader - avatar={ - author === 'anonymous'? - (<Avatar/>) - : - (<Avatar>{author[0].toUpperCase()}</Avatar>) - } + avatar={<GithubAvatar username={author} />} title={author} subheader={date.toLocaleString('default', DATE_FORMAT)} action={ |