Convert the polls reducer to plain JS (#33263)
This commit is contained in:
parent
04a9252a93
commit
1bc28709cc
7 changed files with 89 additions and 131 deletions
|
@ -13,6 +13,7 @@ import Card from 'mastodon/features/status/components/card';
|
|||
import MediaModal from 'mastodon/features/ui/components/media_modal';
|
||||
import { Video } from 'mastodon/features/video';
|
||||
import { IntlProvider } from 'mastodon/locales';
|
||||
import { createPollFromServerJSON } from 'mastodon/models/poll';
|
||||
import { getScrollbarWidth } from 'mastodon/utils/scrollbar';
|
||||
|
||||
const MEDIA_COMPONENTS = { MediaGallery, Video, Card, Poll, Hashtag, Audio };
|
||||
|
@ -88,7 +89,7 @@ export default class MediaContainer extends PureComponent {
|
|||
Object.assign(props, {
|
||||
...(media ? { media: fromJS(media) } : {}),
|
||||
...(card ? { card: fromJS(card) } : {}),
|
||||
...(poll ? { poll: fromJS(poll) } : {}),
|
||||
...(poll ? { poll: createPollFromServerJSON(poll) } : {}),
|
||||
...(hashtag ? { hashtag: fromJS(hashtag) } : {}),
|
||||
|
||||
...(componentName === 'Video' ? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue