Spaces:
Runtime error
Runtime error
fix infinite scroll
Browse files
components/main/hooks/useCollections.ts
CHANGED
@@ -51,7 +51,7 @@ export const useCollections = (category: string) => {
|
|
51 |
})
|
52 |
const d = await response.json()
|
53 |
if (d.ok) {
|
54 |
-
const images = _.concat(data?.images, d?.
|
55 |
client.setQueryData(["collections"], {
|
56 |
images,
|
57 |
pagination: d?.pagination,
|
|
|
51 |
})
|
52 |
const d = await response.json()
|
53 |
if (d.ok) {
|
54 |
+
const images = _.concat(data?.images, d?.collections);
|
55 |
client.setQueryData(["collections"], {
|
56 |
images,
|
57 |
pagination: d?.pagination,
|