refactor: streamline LibraryPage component by integrating ClientLibraryPage for improved structure and error handling

This commit is contained in:
Julien Froidefond
2025-10-16 13:25:51 +02:00
parent f6c702d787
commit 4139d8a059
9 changed files with 167 additions and 62 deletions

View File

@@ -85,7 +85,10 @@ export function BookGrid({ books, onBookClick, isCompact = false }: BookGridProp
<BookCover
book={book}
alt={t("books.coverAlt", {
title: book.metadata.title || `Tome ${book.metadata.number}`,
title: book.metadata.title ||
(book.metadata.number
? t("navigation.volume", { number: book.metadata.number })
: ""),
})}
onSuccess={(book, action) => handleOnSuccess(book, action)}
/>

View File

@@ -158,7 +158,10 @@ export const SeriesHeader = ({ series, refreshSeries }: SeriesHeaderProps) => {
{statusInfo.label}
</span>
<span className="text-sm text-white/80">
{t("series.header.books", { count: series.booksCount })}
{series.booksCount === 1
? t("series.header.books", { count: series.booksCount })
: t("series.header.books_plural", { count: series.booksCount })
}
</span>
<Button
variant="ghost"