Convert Polls to TSX

This commit is contained in:
Alex Gleason 2022-03-26 18:11:26 -05:00
parent 4322712bfb
commit 0cdf898b37
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
5 changed files with 25 additions and 0 deletions

View file

@ -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);

View file

@ -72,6 +72,7 @@
"@types/lodash": "^4.14.180", "@types/lodash": "^4.14.180",
"@types/qrcode.react": "^1.0.2", "@types/qrcode.react": "^1.0.2",
"@types/react-helmet": "^6.1.5", "@types/react-helmet": "^6.1.5",
"@types/react-motion": "^0.0.32",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"@types/react-toggle": "^4.0.3", "@types/react-toggle": "^4.0.3",
"@types/semver": "^7.3.9", "@types/semver": "^7.3.9",

View file

@ -2109,6 +2109,13 @@
dependencies: dependencies:
"@types/react" "*" "@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": "@types/react-redux@^7.1.16":
version "7.1.18" version "7.1.18"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.18.tgz#2bf8fd56ebaae679a90ebffe48ff73717c438e04" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.18.tgz#2bf8fd56ebaae679a90ebffe48ff73717c438e04"