aboutsummaryrefslogtreecommitdiff
path: root/src/components/SolutionCard/SolutionCard.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-03-21 17:38:44 +0300
committereug-vs <eug-vs@keemail.me>2020-03-21 17:38:44 +0300
commit295c6e179ec0f14a10303e01fb6e5b5ef969db79 (patch)
treec3a1ff2849fae554af71849ee33ee3dea2146061 /src/components/SolutionCard/SolutionCard.tsx
parent7f8ab6802c68c46f988ef012fdc88b09e43a9e54 (diff)
downloadchrono-cube-ui-295c6e179ec0f14a10303e01fb6e5b5ef969db79.tar.gz
feat: add github avatars to users
Diffstat (limited to 'src/components/SolutionCard/SolutionCard.tsx')
-rw-r--r--src/components/SolutionCard/SolutionCard.tsx9
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={