make previous button in quote pagination actually subtract page instead

of resetting to page1
This commit is contained in:
2026-04-20 19:16:04 +02:00
parent 879c5ee3d3
commit aab9d87df2

View File

@@ -73,7 +73,7 @@ pub async fn page(
div class="flex justify-between items-center mt-4 text-neutral-400" { div class="flex justify-between items-center mt-4 text-neutral-400" {
@if page > 1 { @if page > 1 {
a href=(format!("/quotes?page={}", (page - 1).min(1))) class="px-4 py-2 border border-neutral-200/25 hover:border-neutral-200/45 bg-neutral-200/5 hover:bg-neutral-200/15 rounded" { a href=(format!("/quotes?page={}", (page - 1).max(1))) class="px-4 py-2 border border-neutral-200/25 hover:border-neutral-200/45 bg-neutral-200/5 hover:bg-neutral-200/15 rounded" {
"Previous" "Previous"
} }
} @else { } @else {