"use client"; import { useRouter } from "next/navigation"; import { Pagination } from "@sakaniui/react"; /** * Sakani pagination driven by the URL. `href` is the current page's URL with * every active filter; a page change swaps only `param` in it. * ponytail: the APIs behind it report "has next page", not a page count, so * the last known page is current + 1. Pass a real total once one exists. */ export function UrlPagination({ href, page, hasNext, param = "page", ariaLabel = "Seiten", }: Readonly<{ href: string; page: number; hasNext: boolean; param?: string; ariaLabel?: string }>) { const router = useRouter(); const total = hasNext ? page + 1 : page; if (total <= 1) return null; return ( ); }