-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6629 from topcoder-platform/develop
Release v1.17.18
- Loading branch information
Showing
38 changed files
with
766 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import _ from 'lodash'; | ||
import challengeDetails from './challenge-details'; | ||
import memberProfile from './profile'; | ||
|
||
export default _.merge({}, challengeDetails); | ||
export default _.merge({}, challengeDetails, memberProfile); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* Actions for member profile page. | ||
*/ | ||
/* global fetch */ | ||
import { redux, config } from 'topcoder-react-utils'; | ||
|
||
/** | ||
* @static | ||
* @desc Initiates an action that fetch member's badges | ||
* @param {String} handle Member handle. | ||
* @return {Action} | ||
*/ | ||
async function getGamificationBadgesInit(handle) { | ||
return { handle }; | ||
} | ||
|
||
/** | ||
* @static | ||
* @desc Creates an action that gets member's badges | ||
* | ||
* @param {String} handle Topcoder member handle. | ||
* @return {Action} | ||
*/ | ||
async function getGamificationBadgesDone(handle) { | ||
try { | ||
const memberInfo = await fetch(`${config.API.V5}/members/${handle}`) | ||
.then(response => response.json()); | ||
const badges = await fetch(`${config.API.V5}/gamification/badges/assigned/${memberInfo.userId}?organization_id=${config.GAMIFICATION.ORG_ID}`) | ||
.then(response => response.json()); | ||
|
||
return { | ||
handle, | ||
badges, | ||
}; | ||
} catch (error) { | ||
return { | ||
handle, | ||
error, | ||
}; | ||
} | ||
} | ||
|
||
export default redux.createActions({ | ||
PAGE: { | ||
PROFILE: { | ||
GET_GAMIFICATION_BADGES_INIT: getGamificationBadgesInit, | ||
GET_GAMIFICATION_BADGES_DONE: getGamificationBadgesDone, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.