Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: hide pagination

Marc Seitz3c1c6a0ec886
diff --git a/pages/documents.tsx b/pages/documents.tsx
index 7c21c738..8d0008a6 100644
--- a/pages/documents.tsx
+++ b/pages/documents.tsx
@@ -160,22 +160,25 @@ export default function Documents({
);
})}
</ul>
- <div className="flex justify-between mx-10">
- <Link
- href={currentPage > 1 ? `?page=${currentPage - 1}` : "#"}
- passHref
- >
- <button disabled={currentPage === 1}>Previous</button>
- </Link>
- <Link
- href={
- currentPage < totalPages ? `?page=${currentPage + 1}` : "#"
- }
- passHref
- >
- <button disabled={currentPage === totalPages}>Next</button>
- </Link>
- </div>
+ {/* Pagination */}
+ {totalPages > 1 && (
+ <div className="flex justify-between mx-10">
+ <Link
+ href={currentPage > 1 ? `?page=${currentPage - 1}` : "#"}
+ passHref
+ >
+ <button disabled={currentPage === 1}>Previous</button>
+ </Link>
+ <Link
+ href={
+ currentPage < totalPages ? `?page=${currentPage + 1}` : "#"
+ }
+ passHref
+ >
+ <button disabled={currentPage === totalPages}>Next</button>
+ </Link>
+ </div>
+ )}
</main>
</Sidebar>
</div>