fix(ui/books): guard against null items from PocketBase listAll

This commit is contained in:
Admin
2026-03-04 00:46:40 +05:00
parent f6febfdb5e
commit 89ff90629f
2 changed files with 3 additions and 3 deletions

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>