Fix polls not being displayed in detailed status (#2857)

This commit is contained in:
Claire 2024-09-24 20:54:24 +02:00 committed by GitHub
parent 5df7e36244
commit 440b695b79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import { Permalink } from 'flavours/glitch/components/permalink';
import PictureInPicturePlaceholder from 'flavours/glitch/components/picture_in_picture_placeholder';
import { useAppHistory } from 'flavours/glitch/components/router';
import { VisibilityIcon } from 'flavours/glitch/components/visibility_icon';
import PollContainer from 'flavours/glitch/containers/poll_container';
import { useAppSelector } from 'flavours/glitch/store';
import { Avatar } from '../../../components/avatar';
@ -277,6 +278,17 @@ export const DetailedStatus: React.FC<{
mediaIcons.push('link');
}
if (status.get('poll')) {
contentMedia.push(
<PollContainer
pollId={status.get('poll')}
// @ts-expect-error -- Poll/PollContainer is not typed yet
lang={status.get('language')}
/>,
);
contentMediaIcons.push('tasks');
}
if (status.get('application')) {
applicationLink = (
<>