cleaning commits & commitsCard.js

This commit is contained in:
Ayush Kumar Sinha 2019-07-01 13:58:26 +05:30
parent 685967a2c9
commit dd09bfc550
2 changed files with 2 additions and 6 deletions

View File

@ -11,11 +11,6 @@ class Commits extends React.Component {
this.props.loadCommits(); this.props.loadCommits();
} }
renderCommits = commit => { renderCommits = commit => {
let tog = 'toggler' + commit.sha;
let committerDate = new Date(commit.commit.committer.date);
let authorDate = new Date(commit.commit.author.date);
let author = encodeURIComponent(commit.commit.author.name);
let committer = encodeURIComponent(commit.commit.committer.name);
return ( return (
<div className='panel-margin' key={commit.sha}> <div className='panel-margin' key={commit.sha}>
<CommitsCard commit={commit} /> <CommitsCard commit={commit} />

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { UncontrolledCollapse, CardBody, Card, CardHeader } from 'reactstrap'; import { UncontrolledCollapse, CardBody, Card, CardHeader } from 'reactstrap';
export default class CommitsCard extends React.Component { class CommitsCard extends React.Component {
render() { render() {
let tog = 'toggler' + this.props.commit.sha; let tog = 'toggler' + this.props.commit.sha;
let committerDate = new Date(this.props.commit.commit.committer.date); let committerDate = new Date(this.props.commit.commit.committer.date);
@ -92,3 +92,4 @@ export default class CommitsCard extends React.Component {
); );
} }
} }
export default CommitsCard;