From a0e79bfe1012b2975b4363dae03176b8869d4bf5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 13 Aug 2022 10:33:58 -0500 Subject: [PATCH] StatusContainer: pass all props through, fix pinned posts not showing as pinned --- app/soapbox/components/status.tsx | 28 +++++++++------------ app/soapbox/components/status_list.tsx | 2 -- app/soapbox/containers/status_container.tsx | 12 +++------ 3 files changed, 15 insertions(+), 27 deletions(-) diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index 04f42a546..020b0756a 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -181,7 +181,7 @@ const Status: React.FC = (props) => { }; if (!status) return null; - let prepend, rebloggedByText, reblogElement, reblogElementMobile; + let rebloggedByText, reblogElement, reblogElementMobile; if (hidden) { return ( @@ -207,20 +207,6 @@ const Status: React.FC = (props) => { ); } - if (featured) { - prepend = ( -
- - - - - - - -
- ); - } - if (status.reblog && typeof status.reblog === 'object') { const displayNameHtml = { __html: String(status.getIn(['account', 'display_name_html'])) }; @@ -318,7 +304,17 @@ const Status: React.FC = (props) => { onClick={() => history.push(statusUrl)} role='link' > - {prepend} + {featured && ( +
+ + + + + + + +
+ )}
= ({ const renderStatus = (statusId: string) => { return ( - // @ts-ignore = ({ if (!featuredStatusIds) return []; return featuredStatusIds.toArray().map(statusId => ( - // @ts-ignore = ({ id, onMoveUp, onMoveDown, withDismiss }) => { +const StatusContainer: React.FC = (props) => { + const { id, ...rest } = props; const status = useAppSelector(state => getStatus(state, { id })); if (status) { - return ( - - ); + return ; } else { return null; }