From 3a47879a72e318afde3b6882896f8616a68f9616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 19 Oct 2024 00:35:12 +0200 Subject: [PATCH] pl-fe: remove getAccount from reply mentions component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../src/features/compose/components/reply-mentions.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/pl-fe/src/features/compose/components/reply-mentions.tsx b/packages/pl-fe/src/features/compose/components/reply-mentions.tsx index cc3051c835..7c233b25a4 100644 --- a/packages/pl-fe/src/features/compose/components/reply-mentions.tsx +++ b/packages/pl-fe/src/features/compose/components/reply-mentions.tsx @@ -1,8 +1,7 @@ -import React, { useCallback } from 'react'; +import React from 'react'; import { FormattedList, FormattedMessage } from 'react-intl'; -import { useAppSelector, useCompose, useFeatures } from 'pl-fe/hooks'; -import { makeGetStatus } from 'pl-fe/selectors'; +import { useCompose, useFeatures } from 'pl-fe/hooks'; import { useModalsStore } from 'pl-fe/stores'; interface IReplyMentions { @@ -13,12 +12,9 @@ const ReplyMentions: React.FC = ({ composeId }) => { const { openModal } = useModalsStore(); const features = useFeatures(); const compose = useCompose(composeId); - - const getStatus = useCallback(makeGetStatus(), []); - const status = useAppSelector(state => getStatus(state, { id: compose.in_reply_to! })); const to = compose.to.toArray(); - if (!features.createStatusExplicitAddressing || !status || !to) { + if (!features.createStatusExplicitAddressing || !compose.in_reply_to || !to) { return null; }