1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-21 18:18:33 +09:00
YuruToot/app/assets/javascripts/components/features/compose/index.jsx

41 lines
1.1 KiB
React
Raw Normal View History

import Drawer from './components/drawer';
import ComposeFormContainer from './containers/compose_form_container';
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';
const Compose = React.createClass({
2016-10-15 19:06:30 +09:00
propTypes: {
dispatch: React.PropTypes.func.isRequired,
withHeader: React.PropTypes.bool
2016-10-15 19:06:30 +09:00
},
mixins: [PureRenderMixin],
2016-10-15 19:06:30 +09:00
componentDidMount () {
this.props.dispatch(mountCompose());
2016-10-15 19:06:30 +09:00
},
componentWillUnmount () {
this.props.dispatch(unmountCompose());
},
render () {
return (
<Drawer withHeader={this.props.withHeader}>
2016-11-25 07:46:27 +09:00
<SearchContainer />
<NavigationContainer />
<ComposeFormContainer />
<UploadFormContainer />
</Drawer>
);
}
});
2016-10-15 19:06:30 +09:00
export default connect()(Compose);