Skip to content

Commit

Permalink
Fix polls not being displayed in detailed status (#2857)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Sep 24, 2024
1 parent 5df7e36 commit 440b695
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 = (
<>
Expand Down

0 comments on commit 440b695

Please sign in to comment.