2020-03-27 13:59:38 -07:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-27 13:51:17 -07:00
|
|
|
import { openModal } from 'soapbox/actions/modal';
|
2020-05-28 15:52:07 -07:00
|
|
|
import Poll from 'soapbox/components/poll';
|
2020-03-27 13:59:38 -07:00
|
|
|
|
|
|
|
const mapStateToProps = (state, { pollId }) => ({
|
|
|
|
poll: state.getIn(['polls', pollId]),
|
2021-10-24 05:03:42 -07:00
|
|
|
me: state.get('me'),
|
2020-03-27 13:59:38 -07:00
|
|
|
});
|
|
|
|
|
2021-10-27 13:51:17 -07:00
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
|
|
|
onOpenUnauthorizedModal() {
|
|
|
|
dispatch(openModal('UNAUTHORIZED'));
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Poll);
|