diff --git a/src/components/repository-list/list-item/index.js b/src/components/repository-list/list-item/index.js index 2efc744..73ba607 100644 --- a/src/components/repository-list/list-item/index.js +++ b/src/components/repository-list/list-item/index.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import GithubColors from 'github-colors'; +import GithubColors from 'github-colors'; import './styles.css'; import moment from 'moment'; @@ -11,21 +11,20 @@ import Issue from "../../icons/issue"; class ListItem extends React.Component { render() { const languageColor = GithubColors.get(this.props.repository.language); - return (

- - { this.props.repository.owner.login } / - { this.props.repository.name } + + {this.props.repository.owner.login} / + {this.props.repository.name}

-

Built by · { this.props.repository.owner.login } · { moment(this.props.repository.created_at).format('MMMM D YYYY') }

+

Built by · {this.props.repository.owner.login} · {moment(this.props.repository.created_at).format('MMMM D YYYY')}

-

{ this.props.repository.description || 'No description given.' }

+

{this.props.repository.description || 'No description given.' }

{ @@ -35,45 +34,45 @@ class ListItem extends React.Component { backgroundColor: languageColor ? languageColor.color : '#e8e8e8' }}> - { this.props.repository.language } + {this.props.repository.language} ) } + href={`${this.props.repository.html_url}/stargazers`} + rel="noopener noreferrer" + target="_blank"> - { this.props.repository.stargazers_count.toLocaleString() } + {this.props.repository.stargazers_count.toLocaleString()} + href={`${this.props.repository.html_url}/network/members`} + rel="noopener noreferrer" + target="_blank"> - { this.props.repository.forks ? this.props.repository.forks.toLocaleString() : 0 } + {this.props.repository.forks ? this.props.repository.forks.toLocaleString() : 0} + href={`${this.props.repository.html_url}/issues`} + rel="noopener noreferrer" + target="_blank"> - { this.props.repository.open_issues ? this.props.repository.open_issues.toLocaleString() : 0 } + {this.props.repository.open_issues ? this.props.repository.open_issues.toLocaleString() : 0}
- + { - e.target.src = '/img/logo.svg'; - } } - alt={ this.props.repository.owner.login } /> + src={this.props.repository.owner.avatar_url} + onError={(e) => { + e.target.src = '/img/logo.svg'; + }} + alt={this.props.repository.owner.login} />
);