From 227fcf21e7686c84a428c76aa829f6982e425319 Mon Sep 17 00:00:00 2001 From: 87xie Date: Sun, 14 Jul 2024 16:59:27 +0800 Subject: [PATCH] refactor: avoid using unnecessary class-name in the pagination component (#274) --- src/components/Pagination.astro | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro index fb64089..4cea6fc 100644 --- a/src/components/Pagination.astro +++ b/src/components/Pagination.astro @@ -12,31 +12,39 @@ const { currentPage, totalPages, prevUrl, nextUrl } = Astro.props; const prev = currentPage > 1 ? "" : "disabled"; const next = currentPage < totalPages ? "" : "disabled"; +const isPrevDisabled = prev === "disabled"; +const isNextDisabled = next === "disabled"; --- { totalPages > 1 && (