Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: update pagination logic

Isaiah Hamiltonb465ea167ecd
diff --git a/apps/temp-docs/components/pagination.tsx b/apps/temp-docs/components/pagination.tsx
index 3defb5c1ea7..8953ae9684e 100644
--- a/apps/temp-docs/components/pagination.tsx
+++ b/apps/temp-docs/components/pagination.tsx
@@ -11,7 +11,7 @@ const pagination = ({ currentPage, totalCount }: { currentPage: number; totalCou
return (
<ul className="flex justify-center space-x-1 text-xs font-medium">
<li>
- <Link href="/discussions?page=1">
+ <Link href={`/discussions?page=${currentPage - 1}`}>
<a className="border-scale-600 bg-scale-300 inline-flex h-8 w-8 items-center justify-center rounded border">
<IconArrowLeft
className="stroke-2 transition group-hover:-translate-x-1"
@@ -37,7 +37,7 @@ const pagination = ({ currentPage, totalCount }: { currentPage: number; totalCou
)
})}
<li>
- <Link href="/discussions?page=1">
+ <Link href={`/discussions?page=${currentPage + 1}`}>
<a className="border-scale-600 bg-scale-300 inline-flex h-8 w-8 items-center justify-center rounded border">
<IconArrowRight
className="stroke-2 transition group-hover:-translate-x-1"