0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-18 16:32:43 +00:00

newPage is now working, working on editpage

This commit is contained in:
Scott Tolksdorf
2016-12-27 15:13:18 -05:00
parent 8abf6abf99
commit f4cf288f27
36 changed files with 280 additions and 1986 deletions

View File

@@ -12,21 +12,17 @@ const PrintPage = React.createClass({
}
};
},
getInitialState: function() {
return {
brewText: this.props.brew.text
};
},
componentDidMount: function() {
if(this.props.query.local){
this.setState({ brewText : localStorage.getItem(this.props.query.local)});
}
if(this.props.query.dialog) window.print();
},
renderPages : function(){
return _.map(this.state.brewText.split('\\page'), (page, index) => {
return <div