Pager wrong props in Challenges and Leaderboard correction

This commit is contained in:
Mateusz Tylka 2023-07-05 22:36:25 +02:00
parent 671d0ed650
commit 38735c7982
3 changed files with 5 additions and 5 deletions

View File

@ -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}

View File

@ -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"

View File

@ -189,7 +189,7 @@ const Leaderboard = (props) => {
)}
<Pager
pageNr={pageNr}
elements={elements}
elements={entries}
setPageNr={setPageNr}
width="72px"
borderRadius="64px"