Feat: Implement interaction modal for Polls (#32609)

This commit is contained in:
Emelia Smith authored and GitHub committed 2024-10-28 13:27:37 +00:00
1 parent 0426cb78f7
commit dc0b1948be
5 files changed
+31 -5

No files matched your search

@@ -2,6 +2,7 @@ import { connect } from 'react-redux';
import { debounce } from 'lodash';
import { openModal } from 'mastodon/actions/modal';
import { fetchPoll, vote } from 'mastodon/actions/polls';
import Poll from 'mastodon/components/poll';
@@ -17,6 +18,17 @@ const mapDispatchToProps = (dispatch, { pollId }) => ({
onVote (choices) {
dispatch(vote(pollId, choices));
},
onInteractionModal (type, status) {
dispatch(openModal({
modalType: 'INTERACTION',
modalProps: {
type,
accountId: status.getIn(['account', 'id']),
url: status.get('uri'),
},
}));
}
});
const mapStateToProps = (state, { pollId }) => ({