Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function mapDispatchToProps(dispatch) {
const action = actions.members;
return {
loadSubtrackChallenges: (handle, tokenV3, track, subTrack, pageNum, pageSize, refresh) => {
const uuid = shortId();
dispatch(action.getSubtrackChallengesInit(handle, uuid));
dispatch(action.getSubtrackChallengesDone(
uuid,
handle,
tokenV3,
track,
subTrack,
pageNum,
pageSize,
refresh,
));
},
function mapDispatchToProps(dispatch) {
const a = actions.members;
const pa = actions.profile;
return {
loadStats: (handle) => {
dispatch(a.getStatsInit(handle));
dispatch(a.getStatsDone(handle));
dispatch(pa.getInfoInit(handle));
dispatch(pa.getInfoDone(handle));
dispatch(a.getActiveChallengesInit(handle));
dispatch(a.getActiveChallengesDone(handle));
},
loadStatsHistoryAndDistribution: (handle, track, subTrack) => {
dispatch(a.getStatsHistoryInit(handle));
dispatch(a.getStatsHistoryDone(handle));
dispatch(a.getStatsDistributionInit(handle));
dispatch(a.getStatsDistributionDone(handle, track, subTrack));