[FIX] corrected fix for sets visble on search page

This commit is contained in:
mg
2022-09-18 22:25:28 +01:00
parent ae8d7efa53
commit 6cee093529
3 changed files with 12 additions and 4 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ export default withRouter(class SearchSets extends Component {
let completeSetsRef;
if (this.state.pageNumber % paginationFrequency === 0 || reload) {
if (this.state.pageNumber === 0 || reload) {
completeSetsRef = setsRef.limit(paginationFrequency);
} else {
completeSetsRef = setsRef.startAfter(this.state.sets[this.state.sets.length - 1]).limit(paginationFrequency);
@@ -334,7 +334,7 @@ export default withRouter(class SearchSets extends Component {
)}
</div>
{
!this.state.loadedAllSets && this.state.sets.length === paginationFrequency &&
!this.state.loadedAllSets && this.state.sets.length % paginationFrequency === 0 &&
<Button
onClick={() => this.loadSets()}
disabled={this.state.loadingSets}