fix(ui/books): guard against null items from PocketBase listAll
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user