Skip to content

Commit b48f340

Browse files
committed
Changes made as per review
1 parent 495497c commit b48f340

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

src/components/ContributorThumbnail.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ const Thumbnail = ({
209209
{organization.depth === 4 &&
210210
checkboxValue &&
211211
organization.cti_contributor ? (
212-
<img
213-
alt='contributor-icon'
214-
data-cy='contributor-icon'
215-
className={classes.contributorIcon}
216-
src='/images/Child_contributed.svg'
217-
/>
218-
) : null}
212+
<img
213+
alt='contributor-icon'
214+
data-cy='contributor-icon'
215+
className={classes.contributorIcon}
216+
src='/images/Child_contributed.svg'
217+
/>
218+
) : null}
219219
</Box>
220220
<Grid className={thumbnailWrapperStyle}>
221221
<Grid item className={classes.imageWrapper}>

src/components/getOrganizationLinks.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
/* eslint-disable no-console */
22

33
const getGithubInfo = (organization) => {
4-
const githubInfo = { imageUrl: null, organizationUrl: null };
4+
const info = { imageUrl: null, organizationUrl: null };
55
const { links } = organization;
6-
let imageUrl;
7-
if (links) {
6+
if (links && links.length) {
87
const githubLink = links.find((link) => link.link_type === 'GitHub');
9-
10-
console.log(githubLink, organization.github_id, organization);
118
if (githubLink) {
129
const githubId = organization.github_id;
13-
if (githubId === null) {
14-
imageUrl = organization.image_url;
15-
} else {
16-
imageUrl = `https://avatars1.githubusercontent.com/u/${githubId}?s=100&v=4`;
17-
}
18-
githubInfo.imageUrl = imageUrl;
19-
githubInfo.organizationUrl = githubLink.url;
10+
11+
info.imageUrl = githubId
12+
? `https://avatars1.githubusercontent.com/u/${githubId}?s=100&v=4`
13+
: organization.image_url;
14+
info.organizationUrl = githubLink.url;
2015
}
2116
}
22-
return githubInfo;
17+
return info;
2318
};
2419

2520
const getImageFromOrg = (organization) => {

0 commit comments

Comments
 (0)