[FIX] corrected fix for sets visble on search page
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "parandum",
|
||||
"version": "2.3.1",
|
||||
"version": "2.3.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.16.0",
|
||||
|
||||
10
src/Home.js
10
src/Home.js
@@ -46,7 +46,15 @@ export default function Home(props) {
|
||||
<br/>
|
||||
<div className="whats-new">
|
||||
<h2>What's New?</h2>
|
||||
<Collapsible open={true} transitionTime={500} easing="ease" trigger={<>v2.3.0<ArrowDropDownRoundedIcon /></>}>
|
||||
<Collapsible open={true} transitionTime={500} easing="ease" trigger={<>v2.3.2<ArrowDropDownRoundedIcon /></>}>
|
||||
<ul>
|
||||
<li>Bug fixes:</li>
|
||||
<ul>
|
||||
<li>On the search page, all sets are now visible rather than just the first 48</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</Collapsible>
|
||||
<Collapsible transitionTime={500} easing="ease" trigger={<>v2.3.0<ArrowDropDownRoundedIcon /></>}>
|
||||
<ul>
|
||||
<li>Add option to ignore accents during tests</li>
|
||||
<li>Update cookie notice</li>
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user