0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-11 13:22:39 +00:00

Removing the ability for the changelog to get into the recent brews

This commit is contained in:
Scott Tolksdorf
2016-06-04 18:30:26 -04:00
parent 7ca4e8ffa6
commit d2a9b3f274

View File

@@ -30,12 +30,14 @@ var BaseItem = React.createClass({
brews = _.filter(brews, (brew)=>{ brews = _.filter(brews, (brew)=>{
return brew.id !== this.props.currentBrew.id; return brew.id !== this.props.currentBrew.id;
}); });
brews.unshift({ if(this.props.currentBrew.id){
id : this.props.currentBrew.id, brews.unshift({
url : this.props.currentBrew.url, id : this.props.currentBrew.id,
title : this.props.currentBrew.title, url : this.props.currentBrew.url,
ts : Date.now() title : this.props.currentBrew.title,
}); ts : Date.now()
});
}
brews = _.slice(brews, 0, 8); brews = _.slice(brews, 0, 8);
localStorage.setItem(this.props.storageKey, JSON.stringify(brews)); localStorage.setItem(this.props.storageKey, JSON.stringify(brews));
this.setState({ this.setState({