@@ -191,14 +191,31 @@ function ServiceFilters({
|
|||||||
|
|
||||||
function Pagination({ page }: { page: Page<unknown> }) {
|
function Pagination({ page }: { page: Page<unknown> }) {
|
||||||
return (
|
return (
|
||||||
<nav aria-label="Paginação" className="flex gap-6 py-5">
|
<nav
|
||||||
{page.prev_page_url && (
|
aria-label="Paginação"
|
||||||
<Link href={page.prev_page_url}>Anterior</Link>
|
className="mx-auto grid w-full max-w-md grid-cols-[1fr_auto_1fr] items-center gap-3 py-5 text-sm"
|
||||||
)}
|
>
|
||||||
<span>{page.total} registos</span>
|
<div className="text-right">
|
||||||
{page.next_page_url && (
|
{page.prev_page_url && (
|
||||||
<Link href={page.next_page_url}>Seguinte</Link>
|
<Link
|
||||||
)}
|
className="inline-block rounded border px-3 py-2"
|
||||||
|
href={page.prev_page_url}
|
||||||
|
>
|
||||||
|
Anterior
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<span className="text-center">{page.total} registos</span>
|
||||||
|
<div>
|
||||||
|
{page.next_page_url && (
|
||||||
|
<Link
|
||||||
|
className="inline-block rounded border px-3 py-2"
|
||||||
|
href={page.next_page_url}
|
||||||
|
>
|
||||||
|
Seguinte
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user