fix pagination missing last entry

This commit is contained in:
bytedream 2024-11-28 20:15:51 +01:00
parent f74aa38bef
commit 58d39921cb
2 changed files with 2 additions and 7 deletions
src/routes/admin

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

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