0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 17:22:45 +00:00

page is sometimes a string??

This commit is contained in:
Víctor Losada Hernández
2024-05-06 23:40:31 +02:00
parent ded78c6639
commit f1a2037bca

View File

@@ -29,7 +29,7 @@ const ArchivePage = createClass({
legacy : `${this.props.query.legacy === 'false' ? false : true }`, legacy : `${this.props.query.legacy === 'false' ? false : true }`,
v3 : `${this.props.query.v3 === 'false' ? false : true }`, v3 : `${this.props.query.v3 === 'false' ? false : true }`,
pageSize : this.props.query.size || 10, pageSize : this.props.query.size || 10,
page : this.props.query.page || 1, page : parseInt(this.props.query.page) || 1,
//response //response
brewCollection : null, brewCollection : null,
@@ -50,7 +50,7 @@ const ArchivePage = createClass({
updateStateWithBrews : function (brews, page, totalPages, totalBrews) { updateStateWithBrews : function (brews, page, totalPages, totalBrews) {
this.setState({ this.setState({
brewCollection : brews || null, brewCollection : brews || null,
page : page || 1, page : parseInt(page) || 1,
totalPages : totalPages || 1, totalPages : totalPages || 1,
totalBrews : totalBrews, totalBrews : totalBrews,
searching : false searching : false
@@ -295,9 +295,6 @@ const ArchivePage = createClass({
); );
}; };
return ( return (
<div className='foundBrews'> <div className='foundBrews'>
<span className='totalBrews'>Brews found: {this.state.totalBrews}</span> <span className='totalBrews'>Brews found: {this.state.totalBrews}</span>