0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-11 02:32:41 +00:00

Merge pull request #4575 from 5e-Cleric/fix-vault-pagination

fix vault pagination going wild
This commit is contained in:
Víctor Losada Hernández
2026-01-03 17:38:31 +01:00
committed by GitHub

View File

@@ -101,7 +101,7 @@ const VaultPage = (props)=>{
const title = titleRef.current.value || '';
const author = authorRef.current.value || '';
const count = countRef.current.value || 10;
const count = countRef.current.value || 20;
const v3 = v3Ref.current.checked != false;
const legacy = legacyRef.current.checked != false;
const sortOption = sort || 'title';
@@ -288,7 +288,8 @@ const VaultPage = (props)=>{
const renderPaginationControls = ()=>{
if(!totalBrews || totalBrews < 10) return null;
const countInt = parseInt(brewCollection.length || 20);
const countInt = parseInt(countRef.current.value || 20);
const totalPages = Math.ceil(totalBrews / countInt);
let startPage, endPage;