maybe fix overfetching now
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m23s

This commit is contained in:
bytedream 2024-11-28 02:31:20 +01:00
parent f461f6db77
commit 750d1b43d7
2 changed files with 7 additions and 2 deletions

View File

@ -120,7 +120,10 @@
</thead>
<PaginationTableBody
onUpdate={async () =>
await fetchReports().then((res) => (reports = [...reports, ...res.reports]))}
await fetchReports().then(
(res) =>
(reports = reports.toSpliced(reports.length - 1, res.reports.length, ...res.reports))
)}
>
{#each reports as report}
<tr

View File

@ -83,7 +83,9 @@
</thead>
<PaginationTableBody
onUpdate={async () => {
await fetchUsers().then((u) => (users = [...users, ...u]));
await fetchUsers().then(
(u) => (users = users.toSpliced(users.length - 1, u.length, ...u))
);
}}
>
{#each users as user, i}