aboutsummaryrefslogtreecommitdiff
path: root/src/pages/Contribute
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-03-21 18:00:45 +0300
committerGitHub <noreply@github.com>2020-03-21 18:00:45 +0300
commit8e48a481be6fdcb6c4ff926165379f79a045fe00 (patch)
tree3e7c1abb50ab4b6f0ee8d08146cae8bd5475e985 /src/pages/Contribute
parente89a7a79622d25561dc80a8489ae1f6022aebd73 (diff)
parentc708ed105c580ed23bf27b6b5ed1e312ed139f57 (diff)
downloadchrono-cube-ui-8e48a481be6fdcb6c4ff926165379f79a045fe00.tar.gz
Merge pull request #49 from eug-vs/githubAvatars
Add fancy avatars from GitHub
Diffstat (limited to 'src/pages/Contribute')
-rw-r--r--src/pages/Contribute/Contribute.tsx40
1 files changed, 16 insertions, 24 deletions
diff --git a/src/pages/Contribute/Contribute.tsx b/src/pages/Contribute/Contribute.tsx
index 4c37fb9..67f2b8a 100644
--- a/src/pages/Contribute/Contribute.tsx
+++ b/src/pages/Contribute/Contribute.tsx
@@ -6,7 +6,6 @@ import {
List,
ListItem,
Link,
- Avatar,
Divider,
makeStyles,
} from '@material-ui/core';
@@ -16,6 +15,7 @@ import BugReportIcon from '@material-ui/icons/BugReport';
import NewReleasesIcon from '@material-ui/icons/NewReleases';
import { Window, ContentSection } from 'react-benzin';
+import GithubAvatar, { getUserGithubUrl } from '../../components/GithubAvatar/GithubAvatar';
import developers from '../../developers.json';
@@ -111,31 +111,23 @@ const Contribute: React.FC = () => {
<ContentSection sectionName="Developers">
<List>
{
- developers.map(developer => {
- const githubUrl = `https://github.com/${developer.username}`;
-
- return (
- <div key={developer.username}>
- <ListItem>
- <Link href={githubUrl}>
- <Avatar alt={developer.username} src={`${githubUrl}.png`} />
- </Link>
- <div>
- <Link href={githubUrl}>
- {developer.username}
- </Link>
- <Typography component="div" color="textSecondary">
- {developer.role}
- </Typography>
- </div>
- </ListItem>
- <Divider variant="middle" />
- </div>
- )
- })
+ developers.map(developer => (
+ <div key={developer.username}>
+ <ListItem>
+ <GithubAvatar username={developer.username} />
+ <div>
+ <Link href={getUserGithubUrl(developer.username)}>{developer.username}</Link>
+ <Typography component="div" color="textSecondary">
+ {developer.role}
+ </Typography>
+ </div>
+ </ListItem>
+ <Divider variant="middle" />
+ </div>
+ ))
}
<ListItem>
- <Avatar />
+ <GithubAvatar username="anonymous" />
You can be here!
</ListItem>
</List>