2020-03-27 13:59:38 -07:00
|
|
|
import { connect } from 'react-redux';
|
2021-09-22 12:38:48 -07:00
|
|
|
import SpoilerButton from '../components/spoiler_button';
|
2020-03-27 13:59:38 -07:00
|
|
|
import { changeComposeSpoilerness } from '../../../actions/compose';
|
|
|
|
|
|
|
|
const mapStateToProps = (state, { intl }) => ({
|
|
|
|
active: state.getIn(['compose', 'spoiler']),
|
|
|
|
});
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
|
2020-04-14 14:47:35 -07:00
|
|
|
onClick() {
|
2020-03-27 13:59:38 -07:00
|
|
|
dispatch(changeComposeSpoilerness());
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2021-09-22 12:38:48 -07:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SpoilerButton);
|