diff --git a/app/soapbox/components/poll.js b/app/soapbox/components/poll.tsx similarity index 56% rename from app/soapbox/components/poll.js rename to app/soapbox/components/poll.tsx index 22e06beb06..b11925fff0 100644 Binary files a/app/soapbox/components/poll.js and b/app/soapbox/components/poll.tsx differ diff --git a/app/soapbox/containers/poll_container.js b/app/soapbox/containers/poll_container.js deleted file mode 100644 index 50d21517a9..0000000000 Binary files a/app/soapbox/containers/poll_container.js and /dev/null differ diff --git a/app/soapbox/containers/poll_container.ts b/app/soapbox/containers/poll_container.ts new file mode 100644 index 0000000000..8d83977afe --- /dev/null +++ b/app/soapbox/containers/poll_container.ts @@ -0,0 +1,17 @@ +import { connect } from 'react-redux'; + +import Poll from 'soapbox/components/poll'; + +import type { RootState } from 'soapbox/store'; + +interface IPollContainer { + pollId: string, +} + +const mapStateToProps = (state: RootState, { pollId }: IPollContainer) => ({ + poll: state.polls.get(pollId), + me: state.me, +}); + + +export default connect(mapStateToProps)(Poll); diff --git a/package.json b/package.json index 4b8b7f358d..a638677434 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "@types/lodash": "^4.14.180", "@types/qrcode.react": "^1.0.2", "@types/react-helmet": "^6.1.5", + "@types/react-motion": "^0.0.32", "@types/react-router-dom": "^5.3.3", "@types/react-toggle": "^4.0.3", "@types/semver": "^7.3.9", diff --git a/yarn.lock b/yarn.lock index 15eb690b99..275ca81c67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2109,6 +2109,13 @@ dependencies: "@types/react" "*" +"@types/react-motion@^0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/react-motion/-/react-motion-0.0.32.tgz#c7355cca054664f1aeadd7388f6890e9355e1783" + integrity sha512-xePjDdhy6/6AX3CUQCeQ2GSF0RwF+lXSpUSrm8tmdUXRf5Ps/dULwouTJ8YHhDvX7WlwYRKZjHXatadz/x3HXA== + dependencies: + "@types/react" "*" + "@types/react-redux@^7.1.16": version "7.1.18" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.18.tgz#2bf8fd56ebaae679a90ebffe48ff73717c438e04"