From a7eef656940cec1e2e28f576ca457e500c59b983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 8 Mar 2025 13:16:41 +0100 Subject: [PATCH] fix pagination not correctly updating --- client/homebrew/pages/vaultPage/vaultPage.jsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 21a8e8363..212e2e468 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -286,9 +286,9 @@ const VaultPage = (props)=>{ }; const renderPaginationControls = ()=>{ - if(!totalBrews) return null; + if(!totalBrews || totalBrews < 10) return null; - const countInt = parseInt(props.query.count || 20); + const countInt = parseInt(brewCollection.length || 20); const totalPages = Math.ceil(totalBrews / countInt); let startPage, endPage; @@ -415,14 +415,14 @@ const VaultPage = (props)=>{ {renderNavItems()} -
- -
{renderForm()}
-
- {renderSortBar()} - {renderFoundBrews()} -
-
+
+ +
{renderForm()}
+
+ {renderSortBar()} + {renderFoundBrews()} +
+
);