mirror of
https://github.com/reactos/developer-web-interface.git
synced 2024-11-26 21:30:35 +00:00
filtering build data based on sha using find()
This commit is contained in:
parent
d7ba9701de
commit
8ae50363cf
@ -12,6 +12,12 @@ class Commits extends React.Component {
|
||||
this.props.loadCommits();
|
||||
}
|
||||
renderCommits = commit => {
|
||||
let filteredBs = this.props.buildData.buildSets
|
||||
.map(obj => {
|
||||
return obj;
|
||||
})
|
||||
.find(item => item.sourcestamps[0].revision === commit.sha);
|
||||
// console.log('bsid:' + filteredBs.bsid + ' sha:' + filteredBs.sourcestamps[0].revision + 'commit:'+commit.sha);
|
||||
return (
|
||||
<div className='panel-margin' key={commit.sha}>
|
||||
<CommitsCard commit={commit} />
|
||||
@ -76,12 +82,13 @@ class Commits extends React.Component {
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
const mapStateToProps = ({ isLoading, commits, error, branch,page }) => ({
|
||||
const mapStateToProps = ({ isLoading, commits, error, branch,page,buildData}) => ({
|
||||
isLoading,
|
||||
commits,
|
||||
error,
|
||||
branch,
|
||||
page
|
||||
page,
|
||||
buildData
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
Loading…
Reference in New Issue
Block a user