bigbuffet-rw/app/soapbox/containers/poll_container.js
marcin mikołajczak 92ee89936e Show unauthorized modal when toggling poll options
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2021-10-27 22:51:17 +02:00

16 lines
445 B
JavaScript

import { connect } from 'react-redux';
import { openModal } from 'soapbox/actions/modal';
import Poll from 'soapbox/components/poll';
const mapStateToProps = (state, { pollId }) => ({
poll: state.getIn(['polls', pollId]),
me: state.get('me'),
});
const mapDispatchToProps = (dispatch) => ({
onOpenUnauthorizedModal() {
dispatch(openModal('UNAUTHORIZED'));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(Poll);