0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 14:02:41 +00:00

Greatly improved the user page UI

This commit is contained in:
Scott Tolksdorf
2016-12-03 16:27:15 -05:00
parent be783e5f6b
commit e5ffb7c629
8 changed files with 96 additions and 30 deletions

View File

@@ -16,6 +16,8 @@ const BrewRenderer = React.createClass({
};
},
getInitialState: function() {
const pages = this.props.text.split('\\page');
return {
viewablePageNumber: 0,
height : 0,
@@ -23,7 +25,8 @@ const BrewRenderer = React.createClass({
usePPR : true,
pages : [],
pages : pages,
usePPR : pages.length >= PPR_THRESHOLD,
errors : []
};