Skip to content

Commit e8e92e8

Browse files
committed
Try to hover and click the nav links Links work as expected
1 parent 829d6df commit e8e92e8

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

client/components/Project/ProjectDetail.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ import Typography from 'material-ui/Typography'
88
import styles from './ProjectDetail.scss'
99

1010
class ProjectDetail extends Component {
11-
constructor (args) {
12-
super(args)
13-
this.state = {projectId: this.props.match.params.id}
14-
}
15-
1611
componentDidMount () {
17-
this.props.fetchProjectById(this.state.projectId)
12+
this.props.fetchProjectById(this.props.match.params.id)
1813
}
1914

2015
renderApplication (application) {
@@ -36,8 +31,8 @@ class ProjectDetail extends Component {
3631
}
3732

3833
render () {
39-
const project = this.props.project || {}
40-
const applications = project.applications || []
34+
const project = this.props.project || {};
35+
const applications = project.applications || [];
4136
return applications.length === 0 ? (
4237
<div>
4338
<h1>No one had applied this project</h1>
@@ -61,16 +56,16 @@ class ProjectDetail extends Component {
6156

6257
const mapDispatchToProps = {
6358
fetchProjectById: ProjectActionCreator.fetchProjectById
64-
}
59+
};
6560

6661
const mapStateToProperties = (state) => {
6762
return {project: state.project.project || {}}
68-
}
63+
};
6964

7065
ProjectDetail.propTypes = {
7166
project: PropTypes.object,
7267
fetchProjectById: PropTypes.func,
7368
match: PropTypes.object
74-
}
69+
};
7570

7671
export default connect(mapStateToProperties, mapDispatchToProps)(ProjectDetail)

0 commit comments

Comments
 (0)