1
0
Fork 0
forked from gitea/nas

Convert the polls reducer to plain JS (#33263)

This commit is contained in:
Renaud Chaput 2025-03-29 21:17:27 +01:00 committed by GitHub
parent 04a9252a93
commit 1bc28709cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 89 additions and 131 deletions

View file

@ -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' ? {