2016-10-12 20:17:17 +09:00
|
|
|
import Drawer from '../ui/components/drawer';
|
|
|
|
import ComposeFormContainer from '../ui/containers/compose_form_container';
|
|
|
|
import FollowFormContainer from '../ui/containers/follow_form_container';
|
|
|
|
import UploadFormContainer from '../ui/containers/upload_form_container';
|
|
|
|
import NavigationContainer from '../ui/containers/navigation_container';
|
|
|
|
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
2016-10-15 19:06:30 +09:00
|
|
|
import SuggestionsContainer from './containers/suggestions_container';
|
|
|
|
import { fetchSuggestions } from '../../actions/suggestions';
|
|
|
|
import { connect } from 'react-redux';
|
2016-10-12 20:17:17 +09:00
|
|
|
|
|
|
|
const Compose = React.createClass({
|
|
|
|
|
2016-10-15 19:06:30 +09:00
|
|
|
propTypes: {
|
|
|
|
dispatch: React.PropTypes.func.isRequired
|
|
|
|
},
|
|
|
|
|
2016-10-12 20:17:17 +09:00
|
|
|
mixins: [PureRenderMixin],
|
|
|
|
|
2016-10-15 19:06:30 +09:00
|
|
|
componentDidMount () {
|
|
|
|
this.props.dispatch(fetchSuggestions());
|
|
|
|
},
|
|
|
|
|
2016-10-12 20:17:17 +09:00
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<Drawer>
|
|
|
|
<div style={{ flex: '1 1 auto' }}>
|
|
|
|
<NavigationContainer />
|
|
|
|
<ComposeFormContainer />
|
|
|
|
<UploadFormContainer />
|
|
|
|
</div>
|
|
|
|
|
2016-10-15 19:06:30 +09:00
|
|
|
<SuggestionsContainer />
|
2016-10-12 20:17:17 +09:00
|
|
|
<FollowFormContainer />
|
|
|
|
</Drawer>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2016-10-15 19:06:30 +09:00
|
|
|
export default connect()(Compose);
|