about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/containers/poll_container.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/containers/poll_container.js')
-rw-r--r--app/javascript/flavours/glitch/containers/poll_container.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/containers/poll_container.js b/app/javascript/flavours/glitch/containers/poll_container.js
index b90864354..345351cc6 100644
--- a/app/javascript/flavours/glitch/containers/poll_container.js
+++ b/app/javascript/flavours/glitch/containers/poll_container.js
@@ -2,7 +2,7 @@ import { connect } from 'react-redux';
 import { debounce } from 'lodash';
 
 import Poll from 'flavours/glitch/components/poll';
-import { fetchPoll } from 'flavours/glitch/actions/polls';
+import { fetchPoll, vote } from 'flavours/glitch/actions/polls';
 
 const mapDispatchToProps = (dispatch, { pollId }) => ({
   refresh: debounce(
@@ -12,6 +12,10 @@ const mapDispatchToProps = (dispatch, { pollId }) => ({
     1000,
     { leading: true },
   ),
+
+  onVote (choices) {
+    dispatch(vote(pollId, choices));
+  },
 });
 
 const mapStateToProps = (state, { pollId }) => ({