{"size": 1259, "ext": "js", "max_stars_repo_path": "src/assets/projectlist/ProjectList.js", "max_stars_repo_name": "mtwangyugeng/web", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/assets/projectlist/ProjectList.js", "max_issues_repo_name": "mtwangyugeng/web", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/assets/projectlist/ProjectList.js", "max_forks_repo_name": "mtwangyugeng/web", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 41.9666666667, "max_line_length": 170, "alphanum_fraction": 0.5226370135}
import React from 'react';
import './ProjectList.css';

import hlink from './hyperlink.png'
import gitlink from './GitHub-Mark-Light-64px.png'

export default class ProjectList extends React.Component{
    render(){
        return (
            <div className = "ProjectList-project">
                <img className = "ProjectList-image" alt = 'project pic' src = {this.props.projectpic}/>
                <div className = "ProjectList-words">
                    <div className = "ProjectList-title">
                        {this.props.title}
                    </div>
                    <div className = "ProjectList-description">
                        {this.props.description}
                    </div>
                </div>
                <div className = "ProjectList-links">
                    {(this.props.hlink) ? <img className = "ProjectList-links-image" alt = 'project pic' src = {hlink} onClick = {this.golink(this.props.hlink)}/> : ''}
                    {(this.props.glink) ? <img className = "ProjectList-links-image" alt = 'project pic' src = {gitlink} onClick = {this.golink(this.props.glink)}/> : ''}
                </div>
            </div>
        );
    }
    golink = (link) => {
        return () => window.open(link)
    }
}