Fix offset in GraphsList
This commit is contained in:
parent
386a9a7bb2
commit
7eabe63198
|
@ -45,7 +45,7 @@ export default function GraphsList() {
|
||||||
if (end) return;
|
if (end) return;
|
||||||
const newOffset = offset + LIMIT;
|
const newOffset = offset + LIMIT;
|
||||||
console.log(`${GraphsList.name}.next:`, { offset, newOffset, term });
|
console.log(`${GraphsList.name}.next:`, { offset, newOffset, term });
|
||||||
const newBests = await getBestSets({ term, offset });
|
const newBests = await getBestSets({ term, offset: newOffset });
|
||||||
if (newBests.length === 0) return setEnd(true);
|
if (newBests.length === 0) return setEnd(true);
|
||||||
if (!bests) return;
|
if (!bests) return;
|
||||||
setBests([...bests, ...newBests]);
|
setBests([...bests, ...newBests]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user