mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 18:42:40 +00:00
Use same brew object throughout
Rather than using separate `brewText` and `styleText` state variables when printing from /new, just load the files into the same `brew` object the rest of the page uses. Also load localstorage in the same way as on `/new` via BREWKEY and STYLEKEY for consistency, rather than passing it in as a separate `brew` item in localstorage
This commit is contained in:
@@ -274,7 +274,6 @@ const NewPage = createClass({
|
||||
},
|
||||
|
||||
print : function(){
|
||||
localStorage.setItem('print', `<style>\n${this.state.brew.style}\n</style>\n\n${this.state.brew.text}`);
|
||||
window.open('/print?dialog=true&local=print', '_blank');
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user