Skip to content

Commit eb1f574

Browse files
committed
Issue #1507 - Clicking on project post notification doesn't enable the Dashboard section
Project wasn’t switched at all when we click links to another project from the project page.
1 parent 041607b commit eb1f574

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/projects/detail/ProjectDetail.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,18 @@ class ProjectDetail extends Component {
4747
this.props.loadProjectDashboard(projectId)
4848
}
4949

50-
componentWillReceiveProps({isProcessing, isLoading, error, project}) {
50+
componentWillReceiveProps({isProcessing, isLoading, error, project, match}) {
5151
// handle just deleted projects
5252
if (! (error || isLoading || isProcessing) && _.isEmpty(project))
5353
this.props.history.push('/projects/')
5454
if (project && project.name) {
5555
document.title = `${project.name} - Topcoder`
5656
}
57+
58+
// load project if URL changed
59+
if (this.props.match.params.projectId !== match.params.projectId) {
60+
this.props.loadProjectDashboard(match.params.projectId)
61+
}
5762
}
5863

5964
getProjectRoleForCurrentUser({currentUserId, project}) {

0 commit comments

Comments
 (0)