mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 10:22:38 +00:00
fix pagination not correctly updating
This commit is contained in:
@@ -286,9 +286,9 @@ const VaultPage = (props)=>{
|
|||||||
};
|
};
|
||||||
|
|
||||||
const renderPaginationControls = ()=>{
|
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);
|
const totalPages = Math.ceil(totalBrews / countInt);
|
||||||
|
|
||||||
let startPage, endPage;
|
let startPage, endPage;
|
||||||
@@ -415,14 +415,14 @@ const VaultPage = (props)=>{
|
|||||||
<link href='/themes/V3/Blank/style.css' rel='stylesheet' />
|
<link href='/themes/V3/Blank/style.css' rel='stylesheet' />
|
||||||
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet' />
|
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet' />
|
||||||
{renderNavItems()}
|
{renderNavItems()}
|
||||||
<div className="content">
|
<div className='content'>
|
||||||
<SplitPane showDividerButtons={false}>
|
<SplitPane showDividerButtons={false}>
|
||||||
<div className='form dataGroup'>{renderForm()}</div>
|
<div className='form dataGroup'>{renderForm()}</div>
|
||||||
<div className='resultsContainer dataGroup'>
|
<div className='resultsContainer dataGroup'>
|
||||||
{renderSortBar()}
|
{renderSortBar()}
|
||||||
{renderFoundBrews()}
|
{renderFoundBrews()}
|
||||||
</div>
|
</div>
|
||||||
</SplitPane>
|
</SplitPane>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user