Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature: Profile Challenge Details in Modal#344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
luizrrodrigues merged 7 commits intomasterfromdevelop
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
"test": "npm run lint && npm run jest"
},
"version": "1.2.6",
"version": "1.2.7",
"dependencies": {
"auth0-js": "^6.8.4",
"config": "^3.2.0",
Expand Down
7 changes: 4 additions & 3 deletionssrc/actions/members.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -257,10 +257,11 @@ async function getStatsDistributionDone(handle, track, subTrack, uuid, tokenV3)
* @desc Create an action that signals beginning of subtrack challenges loading.
* @param {String} handle Member handle.
* @param {String} uuid Operation UUID.
* @param {Number} pageNum Page index.
* @return {Action}
*/
async function getSubtrackChallengesInit(handle, uuid) {
return { handle, uuid };
async function getSubtrackChallengesInit(handle, uuid, pageNum) {
return { handle, uuid, pageNum };
}

/**
Expand DownExpand Up@@ -340,7 +341,7 @@ async function getSubtrackChallengesV4Done(
challenges: res.challenges,
refresh,
handle,
}));
})).catch(e => ({ handle, error: e }));
}

/**
Expand Down
32 changes: 24 additions & 8 deletionssrc/reducers/members.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -289,10 +289,16 @@ function onGetActiveChallengesDone(state, { error, payload }) {
* @return {Object} New state.
*/
function onGetSubtrackChallengesInit(state, { payload }) {
const { handle, uuid } = payload;
const { handle, uuid, pageNum } = payload;

return {
...state,
[handle]: { ...state[handle], loadingSubTrackChallengesUUID: uuid },
[handle]: {
...state[handle],
loadingSubTrackChallengesUUID: uuid,
subtrackChallengesHasMore: false,
...(pageNum === 1 ? { subtrackChallenges: [] } : {}),
},
};
}

Expand All@@ -303,18 +309,28 @@ function onGetSubtrackChallengesInit(state, { payload }) {
* @return {Object} New state.
*/
function onGetSubtrackChallengesDone(state, { error, payload }) {
if (error) {
logger.error('Failed to get member subtrack challenges', payload);
fireErrorMessage('Failed to get member subtrack challenges', '');
return state;
}

const {
uuid,
challenges,
refresh,
handle,
error: payloadError,
} = payload;

if (error || payloadError) {
logger.error('Failed to get member subtrack challenges', payload);
fireErrorMessage('Failed to get member subtrack challenges', '');

return {
...state,
[handle]: {
...state[handle],
subtrackChallengesHasMore: false,
loadingSubTrackChallengesUUID: '',
},
};
}

if (uuid !== state[handle].loadingSubTrackChallengesUUID) return state;

return {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp