bigbuffet-rw/app/soapbox/features/compose/containers/spoiler_button_container.js

18 lines
453 B
JavaScript
Raw Normal View History

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 => ({
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);