Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Commit 2ba4f7f

Browse files
committed
update framework
1 parent 94fbc74 commit 2ba4f7f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/containers/LayoutContainer.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React, {Component} from 'react';
2+
3+
import { connect } from 'react-redux';
4+
import { bindActionCreators } from 'redux';
5+
import _ from 'lodash';
6+
import Header from '../components/Header';
7+
import Footer from '../components/Footer';
8+
import Layout from '../components/Layout';
9+
10+
class LayoutContainer extends Component {
11+
render() {
12+
const {auth, actions } = this.props;
13+
return (
14+
<Layout>
15+
<Header
16+
isAuth={_.get(auth, 'isAuth')}
17+
/>
18+
{this.props.children}
19+
<Footer/>
20+
</Layout>
21+
);
22+
}
23+
}
24+
25+
function mapStateToProps(state, ownProps) {
26+
return {'auth': _.get(state, 'auth', {})};
27+
}
28+
29+
export default connect(
30+
mapStateToProps
31+
)(LayoutContainer)

0 commit comments

Comments
 (0)