v2 #1

Open
kamil wants to merge 231 commits from v2 into main
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 89ff90629f - Show all commits

View File

@@ -125,7 +125,7 @@ async function listAll<T>(collection: string, filter = '', sort = ''): Promise<T
const data = await pbGet<PBList<T>>(
`/api/collections/${collection}/records?${params.toString()}`
);
return data.items;
return data.items ?? [];
}
async function listOne<T>(collection: string, filter: string): Promise<T | null> {

View File

@@ -19,10 +19,10 @@
<div class="mb-6">
<h1 class="text-2xl font-bold text-zinc-100">Library</h1>
<p class="text-zinc-400 text-sm mt-1">{data.books.length} books</p>
<p class="text-zinc-400 text-sm mt-1">{data.books?.length ?? 0} books</p>
</div>
{#if data.books.length === 0}
{#if !data.books?.length}
<div class="text-center py-20 text-zinc-500">
<p class="text-lg">No books scraped yet.</p>
<p class="text-sm mt-2">Use the scraper API to add books.</p>