Convert Polls to TSX
This commit is contained in:
parent
4322712bfb
commit
0cdf898b37
5 changed files with 25 additions and 0 deletions
Binary file not shown.
Binary file not shown.
17
app/soapbox/containers/poll_container.ts
Normal file
17
app/soapbox/containers/poll_container.ts
Normal 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);
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue