1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
mastodon/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';
2016-10-15 03:06:30 -07:00
import SuggestionsContainer from './containers/suggestions_container';
2016-11-13 04:04:18 -08:00
import SearchContainer from './containers/search_container';
2016-10-15 03:06:30 -07:00
import { fetchSuggestions } from '../../actions/suggestions';
import { connect } from 'react-redux';
const Compose = React.createClass({
2016-10-15 03:06:30 -07:00
propTypes: {
dispatch: React.PropTypes.func.isRequired
},
mixins: [PureRenderMixin],
2016-10-15 03:06:30 -07:00
componentDidMount () {
this.props.dispatch(fetchSuggestions());
},
render () {
return (
<Drawer>
<div style={{ flex: '1 1 auto' }}>
2016-11-13 04:04:18 -08:00
<SearchContainer />
<NavigationContainer />
<ComposeFormContainer />
<UploadFormContainer />
</div>
2016-10-15 03:06:30 -07:00
<SuggestionsContainer />
</Drawer>
);
}
});
2016-10-15 03:06:30 -07:00
export default connect()(Compose);