2017-10-13 19:01:14 +03:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import DoodleButton from '../components/doodle_button';
|
|
|
|
import { openModal } from '../../../actions/modal';
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 3 || state.getIn(['compose', 'media_attachments']).some(m => m.get('type') === 'video')),
|
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onOpenCanvas () {
|
2017-10-14 13:24:35 +03:00
|
|
|
dispatch(openModal('DOODLE', { noEsc: true }));
|
2017-10-13 19:01:14 +03:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(DoodleButton);
|