in src/GitHubOverview.js [90:133]
render() {
let canvas = null;
if (this.state.statuses && this.state.statuses.length > 0) {
canvas = (
<canvas
height="100"
width={this.state.statuses[0].length}
ref={this.canvas}
></canvas>
);
}
return (
<div
style={{
border: "1px solid #d2d2d2",
borderRadius: "5px",
padding: "10px",
margin: "5px",
display: "grid",
gridTemplateRows: "3em auto",
textAlign: "center",
}}
>
<span>
<a href={`https://github.com/${this.props.user}/${this.props.repo}`}>
{this.props.user}/{this.props.repo}
</a>
<a
style={{ marginLeft: "5px" }}
href={`/ci/${this.props.user}/${this.props.repo}/${this.props.branch}`}
>
{this.props.branch}
</a>
</span>
<div>
<a
href={`/ci/${this.props.user}/${this.props.repo}/${this.props.branch}`}
>
{canvas}
</a>
</div>
</div>
);
}