Update BetterSearchPage.plugin.js
This commit is contained in:
parent
c47eb8ca94
commit
c9d55f3c77
|
@ -108,7 +108,6 @@ module.exports = (_ => {
|
||||||
processSearchResultsInner (e) {
|
processSearchResultsInner (e) {
|
||||||
if (!e.instance.props.search) return;
|
if (!e.instance.props.search) return;
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "SearchResultsPagination"});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "SearchResultsPagination"});
|
||||||
console.log(children, index);
|
|
||||||
if (index == -1) return;
|
if (index == -1) return;
|
||||||
let currentPage = parseInt(Math.floor(e.instance.props.search.offset / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) + 1;
|
let currentPage = parseInt(Math.floor(e.instance.props.search.offset / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) + 1;
|
||||||
let maxPage = e.instance.props.search.totalResults > 5000 ? parseInt(Math.ceil(5000 / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) : parseInt(Math.ceil(e.instance.props.search.totalResults / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE));
|
let maxPage = e.instance.props.search.totalResults > 5000 ? parseInt(Math.ceil(5000 / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) : parseInt(Math.ceil(e.instance.props.search.totalResults / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE));
|
||||||
|
|
Loading…
Reference in New Issue