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