Skip to content

Commit 125cf7d

Browse files
authored
Merge pull request #1625 from topcoder-platform/pm-974_3
fix(PM-974): projects list in challenges tab
2 parents 18768fd + b184e86 commit 125cf7d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/containers/Challenges/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
deleteChallenge,
1515
loadChallengeTypes
1616
} from '../../actions/challenges'
17-
import { loadProject, updateProject } from '../../actions/projects'
17+
import { loadProject, loadProjects, updateProject } from '../../actions/projects'
1818
import {
1919
loadNextProjects,
2020
setActiveProject,
@@ -42,6 +42,7 @@ class Challenges extends Component {
4242
} = this.props
4343
loadChallengeTypes()
4444
if (dashboard) {
45+
this.props.loadProjects('', {})
4546
this.reloadChallenges(this.props, true, true)
4647
}
4748
if (menu === 'NULL' && activeProjectId !== -1) {
@@ -234,7 +235,8 @@ Challenges.propTypes = {
234235
fetchNextProjects: PropTypes.func.isRequired,
235236
metadata: PropTypes.shape({
236237
challengeTypes: PropTypes.array
237-
})
238+
}),
239+
loadProjects: PropTypes.func.isRequired
238240
}
239241

240242
const mapStateToProps = ({ challenges, sidebar, projects, auth }) => ({
@@ -265,7 +267,8 @@ const mapDispatchToProps = {
265267
loadChallengeTypes,
266268
setActiveProject,
267269
partiallyUpdateChallengeDetails,
268-
deleteChallenge
270+
deleteChallenge,
271+
loadProjects
269272
}
270273

271274
export default connect(mapStateToProps, mapDispatchToProps)(Challenges)

0 commit comments

Comments
 (0)