Pager wrong props in Challenges and Leaderboard correction
This commit is contained in:
parent
671d0ed650
commit
38735c7982
@ -33,7 +33,7 @@ const Challenges = () => {
|
||||
statusFilterHandle(state.statusFilter, state.challenges, dispatch);
|
||||
}, [state.statusFilter, state.challenges]);
|
||||
|
||||
const setPage = React.useCallback((value) => {
|
||||
const setPageNr = React.useCallback((value) => {
|
||||
dispatch({ type: CHALLENGES_ACTION.SET_PAGE, payload: value });
|
||||
}, []);
|
||||
|
||||
@ -73,7 +73,7 @@ const Challenges = () => {
|
||||
dispatch={dispatch}
|
||||
filtersMenuRender={filtersMenuRender}
|
||||
searchQueryHandler={searchQueryHandler}
|
||||
setPage={setPage}
|
||||
setPageNr={setPageNr}
|
||||
filtersMenu={state.filtersMenu}
|
||||
loading={state.loading}
|
||||
pageNr={state.pageNr}
|
||||
@ -85,7 +85,7 @@ const Challenges = () => {
|
||||
dispatch={dispatch}
|
||||
filtersMenuRender={filtersMenuRender}
|
||||
searchQueryHandler={searchQueryHandler}
|
||||
setPage={setPage}
|
||||
setPageNr={setPageNr}
|
||||
filtersMenu={state.filtersMenu}
|
||||
loading={state.loading}
|
||||
pageNr={state.pageNr}
|
||||
|
@ -35,7 +35,7 @@ const ChallengesDesktop = (props) => {
|
||||
{!props.loading && (
|
||||
<Pager
|
||||
pageNr={props.pageNr}
|
||||
setPage={props.setPage}
|
||||
setPageNr={props.setPageNr}
|
||||
elements={props.challengesFiltered}
|
||||
pages={CALC_PAGES(props.challengesFiltered)}
|
||||
width="72px"
|
||||
|
@ -189,7 +189,7 @@ const Leaderboard = (props) => {
|
||||
)}
|
||||
<Pager
|
||||
pageNr={pageNr}
|
||||
elements={elements}
|
||||
elements={entries}
|
||||
setPageNr={setPageNr}
|
||||
width="72px"
|
||||
borderRadius="64px"
|
||||
|
Loading…
Reference in New Issue
Block a user