Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
infinite scroll
Browse files- src/routes/+page.svelte +3 -1
src/routes/+page.svelte
CHANGED
@@ -16,6 +16,8 @@
|
|
16 |
|
17 |
export let data
|
18 |
|
|
|
|
|
19 |
let form = {
|
20 |
filter: "hotest",
|
21 |
search: "",
|
@@ -47,7 +49,7 @@
|
|
47 |
const refetch = async (add: boolean) => {
|
48 |
const request = await fetch(`/api/models?${new URLSearchParams(form)}`);
|
49 |
const response = await request.json();
|
50 |
-
if (add) data = {...data, models: [...data.models, ...response.
|
51 |
else data = response;
|
52 |
}
|
53 |
</script>
|
|
|
16 |
|
17 |
export let data
|
18 |
|
19 |
+
console.log(data)
|
20 |
+
|
21 |
let form = {
|
22 |
filter: "hotest",
|
23 |
search: "",
|
|
|
49 |
const refetch = async (add: boolean) => {
|
50 |
const request = await fetch(`/api/models?${new URLSearchParams(form)}`);
|
51 |
const response = await request.json();
|
52 |
+
if (add) data = {...data, models: [...data.models, ...response.cards ]};
|
53 |
else data = response;
|
54 |
}
|
55 |
</script>
|