bigbuffet-rw/app/soapbox/features/compose/containers/spoiler_button_container.js
2021-09-22 14:38:48 -05:00

17 lines
453 B
JavaScript

import { connect } from 'react-redux';
import SpoilerButton from '../components/spoiler_button';
import { changeComposeSpoilerness } from '../../../actions/compose';
const mapStateToProps = (state, { intl }) => ({
active: state.getIn(['compose', 'spoiler']),
});
const mapDispatchToProps = dispatch => ({
onClick() {
dispatch(changeComposeSpoilerness());
},
});
export default connect(mapStateToProps, mapDispatchToProps)(SpoilerButton);