about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/containers/poll_container.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-03-03 22:18:23 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-05 21:35:03 +0100
commit8d70a8a19b2d8436a1361b2bdeb42e7949acc7d0 (patch)
tree74d07fd021739ffc493521e90f032f4d11203179 /app/javascript/flavours/glitch/containers/poll_container.js
parent0d19fcc2fb8579a61b87206a9376cf113d82ccf4 (diff)
Add polls
Port front-end parts of 230a012f0090c496fc5cdb011bcc8ed732fd0f5c to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/containers/poll_container.js')
-rw-r--r--app/javascript/flavours/glitch/containers/poll_container.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/containers/poll_container.js b/app/javascript/flavours/glitch/containers/poll_container.js
new file mode 100644
index 000000000..cd7216de7
--- /dev/null
+++ b/app/javascript/flavours/glitch/containers/poll_container.js
@@ -0,0 +1,8 @@
+import { connect } from 'react-redux';
+import Poll from 'mastodon/components/poll';
+
+const mapStateToProps = (state, { pollId }) => ({
+  poll: state.getIn(['polls', pollId]),
+});
+
+export default connect(mapStateToProps)(Poll);