From 3e94d9dd538ea54644e3a5478ab84e4d8442faf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 5 Oct 2024 23:49:21 +0200 Subject: [PATCH] pl-fe: Prefer using ids directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/components/status-action-bar.tsx | 4 ++-- packages/pl-fe/src/components/status.tsx | 4 ++-- .../src/features/compose/components/reply-indicator.tsx | 6 +++--- .../src/features/notifications/components/notification.tsx | 2 +- .../features/ui/components/modals/reply-mentions-modal.tsx | 2 +- packages/pl-fe/src/reducers/timelines.ts | 4 ++-- packages/pl-fe/src/selectors/index.ts | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/pl-fe/src/components/status-action-bar.tsx b/packages/pl-fe/src/components/status-action-bar.tsx index 1b478cce0..ced526f48 100644 --- a/packages/pl-fe/src/components/status-action-bar.tsx +++ b/packages/pl-fe/src/components/status-action-bar.tsx @@ -372,7 +372,7 @@ const StatusActionBar: React.FC = ({ message: intl.formatMessage(messages.groupBlockFromGroupMessage, { name: status.account.username }), confirm: intl.formatMessage(messages.groupBlockConfirm), onConfirm: () => { - blockGroupMember([status.account.id], { + blockGroupMember([status.account_id], { onSuccess() { toast.success(intl.formatMessage(messages.blocked, { name: account?.acct })); }, @@ -395,7 +395,7 @@ const StatusActionBar: React.FC = ({ const _makeMenu = (publicStatus: boolean) => { const mutingConversation = status.muted; - const ownAccount = status.account.id === me; + const ownAccount = status.account_id === me; const username = status.account.username; const account = status.account; diff --git a/packages/pl-fe/src/components/status.tsx b/packages/pl-fe/src/components/status.tsx index 916982fb8..65ed106b0 100644 --- a/packages/pl-fe/src/components/status.tsx +++ b/packages/pl-fe/src/components/status.tsx @@ -396,8 +396,8 @@ const Status: React.FC = (props) => { {renderStatusInfo()} & { account: Pick }; + status?: Pick; onCancel?: () => void; hideActions: boolean; } @@ -40,7 +40,7 @@ const ReplyIndicator: React.FC = ({ className, status, hideActi = (props) => { case 'move': return account && typeof account === 'object' && notification.target && typeof notification.target === 'object' ? (