2016-11-21 10:52:11 +01:00
|
|
|
import Drawer from './components/drawer';
|
2016-11-13 19:08:52 +01:00
|
|
|
import ComposeFormContainer from './containers/compose_form_container';
|
2016-11-21 10:52:11 +01:00
|
|
|
import UploadFormContainer from './containers/upload_form_container';
|
|
|
|
import NavigationContainer from './containers/navigation_container';
|
|
|
|
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
|
|
|
import SearchContainer from './containers/search_container';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { mountCompose, unmountCompose } from '../../actions/compose';
|
2016-10-12 13:17:17 +02:00
|
|
|
|
|
|
|
const Compose = React.createClass({
|
|
|
|
|
2016-10-15 12:06:30 +02:00
|
|
|
propTypes: {
|
2017-01-06 22:09:55 +01:00
|
|
|
dispatch: React.PropTypes.func.isRequired,
|
|
|
|
withHeader: React.PropTypes.bool
|
2016-10-15 12:06:30 +02:00
|
|
|
},
|
|
|
|
|
2016-10-12 13:17:17 +02:00
|
|
|
mixins: [PureRenderMixin],
|
|
|
|
|
2016-10-15 12:06:30 +02:00
|
|
|
componentDidMount () {
|
2016-11-21 10:52:11 +01:00
|
|
|
this.props.dispatch(mountCompose());
|
2016-10-15 12:06:30 +02:00
|
|
|
},
|
|
|
|
|
2016-11-21 10:52:11 +01:00
|
|
|
componentWillUnmount () {
|
|
|
|
this.props.dispatch(unmountCompose());
|
|
|
|
},
|
|
|
|
|
2016-10-12 13:17:17 +02:00
|
|
|
render () {
|
|
|
|
return (
|
2017-01-06 22:09:55 +01:00
|
|
|
<Drawer withHeader={this.props.withHeader}>
|
2016-11-24 23:46:27 +01:00
|
|
|
<SearchContainer />
|
|
|
|
<NavigationContainer />
|
|
|
|
<ComposeFormContainer />
|
|
|
|
<UploadFormContainer />
|
2016-10-12 13:17:17 +02:00
|
|
|
</Drawer>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2016-10-15 12:06:30 +02:00
|
|
|
export default connect()(Compose);
|