Skip to content

Commit 9f2c924

Browse files
committed
1 parent 5382dc3 commit 9f2c924

File tree

3 files changed

+46
-29
lines changed

3 files changed

+46
-29
lines changed

static/src/components/Analytics.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ function mapDispatchToProps(dispatch) {
1414
return bindActionCreators(actionCreators, dispatch);
1515
}
1616

17-
const Analytics = connect(mapStateToProps, mapDispatchToProps)(() =>
18-
<div className="col-md-8">
19-
<h1>Analytics</h1>
20-
<hr />
21-
</div>
22-
);
17+
@connect(mapStateToProps, mapDispatchToProps)
18+
class Analytics extends React.Component { // eslint-disable-line react/prefer-stateless-function
19+
render() {
20+
return (
21+
<div className="col-md-8">
22+
<h1>Analytics</h1>
23+
<hr />
24+
</div>
25+
);
26+
}
27+
}
2328

2429
export default Analytics;

static/src/components/NotFound.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ function mapDispatchToProps(dispatch) {
1616
return bindActionCreators(actionCreators, dispatch);
1717
}
1818

19-
const NotFound = connect(mapStateToProps, mapDispatchToProps)(() =>
20-
<div className="col-md-8">
21-
<h1>Not Found</h1>
22-
</div>
23-
);
19+
@connect(mapStateToProps, mapDispatchToProps)
20+
class NotFound extends React.Component { // eslint-disable-line react/prefer-stateless-function
21+
render() {
22+
return (
23+
<div className="col-md-8">
24+
<h1>Not Found</h1>
25+
</div>
26+
);
27+
}
28+
}
2429

2530
export default NotFound;

static/src/containers/App/index.js

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,29 @@ import { Footer } from '../../components/Footer';
1010
/* global styles for app */
1111
import './styles/app.scss';
1212

13-
export const App = ({ children }) =>
14-
<MuiThemeProvider muiTheme={getMuiTheme()}>
15-
<section>
16-
<Header />
17-
<div
18-
className="container"
19-
style={{ marginTop: 10, paddingBottom: 250 }}
20-
>
21-
{children}
22-
</div>
23-
<div>
24-
<Footer />
25-
</div>
26-
</section>
27-
</MuiThemeProvider>;
13+
class App extends React.Component { // eslint-disable-line react/prefer-stateless-function
14+
static propTypes = {
15+
children: React.PropTypes.node,
16+
};
2817

29-
App.propTypes = {
30-
children: React.PropTypes.node,
31-
};
18+
render() {
19+
return (
20+
<MuiThemeProvider muiTheme={getMuiTheme()}>
21+
<section>
22+
<Header />
23+
<div
24+
className="container"
25+
style={{ marginTop: 10, paddingBottom: 250 }}
26+
>
27+
{this.props.children}
28+
</div>
29+
<div>
30+
<Footer />
31+
</div>
32+
</section>
33+
</MuiThemeProvider>
34+
);
35+
}
36+
}
37+
38+
export { App };

0 commit comments

Comments
 (0)