0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 14:02:40 +00:00

pagination controls update search terms

This commit is contained in:
Víctor Losada Hernández
2024-05-08 15:33:27 +02:00
parent 02450982c1
commit 9966e6322d

View File

@@ -117,7 +117,7 @@ const ArchivePage = createClass({
this.setState({ error: `${error.response.status}` });
this.updateStateWithBrews([], 1, 1, 0);
}
console.log('a',
console.log("We've come up empty",
!this.state.brewCollection || this.state.brewCollection.length === 0
);
if (!this.state.brewCollection) {
@@ -252,7 +252,7 @@ const ArchivePage = createClass({
{page > 1 && (
<button
className="previousPage"
onClick={() => this.loadPage(page - 1, false)}
onClick={() => this.loadPage(page - 1, true)}
>
&lt;&lt;
</button>
@@ -261,7 +261,7 @@ const ArchivePage = createClass({
{page < totalPages && (
<button
className="nextPage"
onClick={() => this.loadPage(page + 1, false)}
onClick={() => this.loadPage(page + 1, true)}
>
&gt;&gt;
</button>