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.

39 lines
1004 B

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