diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro index 72d2611..6d26bdd 100644 --- a/src/components/Pagination.astro +++ b/src/components/Pagination.astro @@ -59,8 +59,7 @@ function getVisiblePages(total: number, current: number): Array { result.push(page); previousPage = page; } - // reverse order - return result.reverse(); + return result; } --- @@ -69,12 +68,12 @@ function getVisiblePages(total: number, current: number): Array { >
{ - current < total ? ( + current > 1 ? ( @@ -91,7 +90,7 @@ function getVisiblePages(total: number, current: number): Array { clip-rule="evenodd" /> - older + newer ) : null } @@ -117,16 +116,16 @@ function getVisiblePages(total: number, current: number): Array {
{ - current > 1 ? ( + current < total ? ( - newer + older