Skip to content

Commit e7f9a1d

Browse files
committed
Combine six landing page sections into a single Lander component and route "/" to it.
1 parent 0001a1e commit e7f9a1d

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

client/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ import LandingD from './components/LandingD/LandingD'
2525
const ProfileRestrictedLoadable = restricted(Loadable({
2626
loader: () => import('./components/Profile/Profile'),
2727
loading: Loading
28-
}));
28+
}))
2929

3030
const CreateProjectRestrictedLoadable = restricted(Loadable({
3131
loader: () => import('./components/CreateProjectForm/CreateProjectForm'),
3232
loading: Loading
33-
}));
33+
}))
3434

3535
const ApplicationsRestrictedLoadable = restricted(Loadable({
3636
loader: () => import('./components/Applications/ApplicationsList'),
3737
loading: Loading
38-
}));
38+
}))
3939

4040
class App extends Component {
4141
componentDidMount () {
@@ -90,11 +90,11 @@ function mapStateToProps (state) {
9090

9191
const mapDispatchToProps = {
9292
appLoad: AuthActionCreator.appLoad
93-
};
93+
}
9494

9595
App.propTypes = {
9696
appLoad: PropTypes.func,
9797
appLoaded: PropTypes.bool
98-
};
98+
}
9999

100100
export default connect(mapStateToProps, mapDispatchToProps)(App)

client/components/Home/Home.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import LandingF from '../LandingF/LandingF'
1616

1717
class Home extends Component {
1818
constructor (props) {
19-
super(props);
20-
this.handleCheckbox = this.handleCheckbox.bind(this);
21-
this.renderList = this.renderList.bind(this);
19+
super(props)
20+
this.handleCheckbox = this.handleCheckbox.bind(this)
21+
this.renderList = this.renderList.bind(this)
2222
this.state = {
2323
filters: {
2424
causes: [],
@@ -36,7 +36,7 @@ class Home extends Component {
3636
if (this.props.projects !== nextProps.projects) {
3737
this.setState({filteredProjects: nextProps.projects})
3838
}
39-
};
39+
}
4040

4141
projectContainsCause (project) {
4242
return this.state.filters.causes.length === 0 || this.state.filters.causes.some(cause => project.causes.indexOf(cause) >= 0)
@@ -46,17 +46,17 @@ class Home extends Component {
4646
}
4747

4848
handleCheckbox (event, checked) {
49-
const filters = this.state.filters;
50-
const index = this.state.filters[event.target.name].indexOf(event.target.value);
49+
const filters = this.state.filters
50+
const index = this.state.filters[event.target.name].indexOf(event.target.value)
5151
if (index === -1) {
5252
filters[event.target.name].push(event.target.value)
5353
} else {
5454
filters[event.target.name].splice(index, 1)
5555
}
56-
this.setState({ filters });
56+
this.setState({ filters })
5757
const filteredProjects = this.props.projects.filter(project => {
5858
return this.projectContainsCause(project) && this.projectContainsTech(project)
59-
});
59+
})
6060
this.setState({ filteredProjects })
6161
}
6262

@@ -99,12 +99,12 @@ function mapStateToProps (state) {
9999
const mapDispatchToProps = {
100100
onLoad: ProjectActionCreator.fetchAllProjects
101101

102-
};
102+
}
103103

104104
Home.propTypes = {
105105
onLoad: PropTypes.func,
106106
projects: PropTypes.array
107107

108-
};
108+
}
109109

110110
export default connect(mapStateToProps, mapDispatchToProps)(Home)

0 commit comments

Comments
 (0)