You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

  1. import Drawer from '../ui/components/drawer';
  2. import ComposeFormContainer from '../ui/containers/compose_form_container';
  3. import FollowFormContainer from '../ui/containers/follow_form_container';
  4. import UploadFormContainer from '../ui/containers/upload_form_container';
  5. import NavigationContainer from '../ui/containers/navigation_container';
  6. import PureRenderMixin from 'react-addons-pure-render-mixin';
  7. import SuggestionsContainer from './containers/suggestions_container';
  8. import { fetchSuggestions } from '../../actions/suggestions';
  9. import { connect } from 'react-redux';
  10. const Compose = React.createClass({
  11. propTypes: {
  12. dispatch: React.PropTypes.func.isRequired
  13. },
  14. mixins: [PureRenderMixin],
  15. componentDidMount () {
  16. this.props.dispatch(fetchSuggestions());
  17. },
  18. render () {
  19. return (
  20. <Drawer>
  21. <div style={{ flex: '1 1 auto' }}>
  22. <NavigationContainer />
  23. <ComposeFormContainer />
  24. <UploadFormContainer />
  25. </div>
  26. <SuggestionsContainer />
  27. <FollowFormContainer />
  28. </Drawer>
  29. );
  30. }
  31. });
  32. export default connect()(Compose);