diff --git a/src/components/search/AlbumSearch.astro b/src/components/search/AlbumSearch.astro index faebc3a..291533a 100644 --- a/src/components/search/AlbumSearch.astro +++ b/src/components/search/AlbumSearch.astro @@ -40,18 +40,20 @@ const [count, search] = await Promise.all([ ]) --- -
+
Albums ({count}) { count > take ? ( - / Showing {page === 1 ? `first ${take}` : `${(page - 1) * take}-${page * take}`} results + / Showing {page === 1 ? `first ${take}` : `${(page - 1) * take}-${Math.min(page * take, count)}`} results ) : null }
-
- {Array.from({ length: Math.ceil(count / take) }, (_, i) => ( - {i + 1} - ))} +
+ { + Array.from({ length: Math.ceil(count / take) }, (_, i) => + page === i + 1 ? {i + 1} : {i + 1} + ) + }