diff --git a/packages/pl-fe/src/components/status.tsx b/packages/pl-fe/src/components/status.tsx index e8ef15398..4cc55f9a7 100644 --- a/packages/pl-fe/src/components/status.tsx +++ b/packages/pl-fe/src/components/status.tsx @@ -33,10 +33,33 @@ import StatusReplyMentions from './status-reply-mentions'; import StatusInfo from './statuses/status-info'; import Tombstone from './tombstone'; + + const messages = defineMessages({ reblogged_by: { id: 'status.reblogged_by', defaultMessage: '{name} reposted' }, }); +interface IAccountInfo { + status: SelectedStatus; +} + +const AccountInfo: React.FC = React.memo(({ status }) => ( +
+ event.stopPropagation()}> + + + + + {!!status.edited_at && ( + <> + + + + + )} +
+)); + interface IStatusFollowedTagInfo { status: SelectedStatus; avatarSize: number; @@ -453,22 +476,7 @@ const Status: React.FC = (props) => { - event.stopPropagation()}> - - - - - {!!actualStatus.edited_at && ( - <> - - - - - )} - - } + action={} showAccountHoverCard={hoverable} withLinkToProfile={hoverable} approvalStatus={actualStatus.approval_status} diff --git a/packages/pl-fe/src/features/chats/components/chat-list.tsx b/packages/pl-fe/src/features/chats/components/chat-list.tsx index 8d68aa097..94cb2e06c 100644 --- a/packages/pl-fe/src/features/chats/components/chat-list.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-list.tsx @@ -71,7 +71,7 @@ const ChatList: React.FC = ({ onClickChat, useWindowScroll = false }) )} components={{ - ScrollSeekPlaceholder: () => , + ScrollSeekPlaceholder: PlaceholderChat, Footer: () => hasNextPage ? : null, EmptyPlaceholder: renderEmpty, }} diff --git a/packages/pl-fe/src/features/notifications/components/notification.tsx b/packages/pl-fe/src/features/notifications/components/notification.tsx index e234c2e59..18b345904 100644 --- a/packages/pl-fe/src/features/notifications/components/notification.tsx +++ b/packages/pl-fe/src/features/notifications/components/notification.tsx @@ -1,5 +1,5 @@ import { Link, useNavigate } from '@tanstack/react-router'; -import React, { useCallback, useRef } from 'react'; +import React, { useCallback, useMemo, useRef } from 'react'; import { defineMessages, useIntl, FormattedList, FormattedMessage, IntlShape, MessageDescriptor } from 'react-intl'; import { mentionCompose, replyCompose } from '@/actions/compose'; @@ -359,7 +359,7 @@ const Notification: React.FC = (props) => { const displayedType = notification.type === 'mention' && (notification.subtype === 'reply' || status?.in_reply_to_account_id === me) ? 'reply' : notification.type; - const renderIcon = (): React.ReactNode => { + const icon = useMemo(() => { if (type === 'emoji_reaction' && notification.emoji) { return ( = (props) => { } else { return null; } - }; + }, [type, (notification as any).emoji]); const renderContent = () => { if (type === 'bite' && status) { @@ -478,7 +478,7 @@ const Notification: React.FC = (props) => { ) ); - const statusInfo = ; + const statusInfo = ; return (