Skip to content

Commit ee6a3da

Browse files
authored
Merge pull request #1517 from maxceem/issue-1507
Issue #1507 - Clicking on project post notification doesn't enable the Dashboard section
2 parents 0ef500d + eb1f574 commit ee6a3da

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/components/ActionCard/Comment.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import cn from 'classnames'
33
import Panel from '../Panel/Panel'
44
import { Avatar } from 'appirio-tech-react-components'
55
import RichTextArea from '../RichTextArea/RichTextArea'
6+
import { Link } from 'react-router-dom'
67
import CommentEditToggle from './CommentEditToggle'
78

89
class Comment extends React.Component {

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)