import classNames from 'clsx'; import React from 'react'; import { FormattedMessage } from 'react-intl'; import { getSettings } from 'soapbox/actions/settings'; import Avatar from 'soapbox/components/avatar'; import DisplayName from 'soapbox/components/display-name'; import Permalink from 'soapbox/components/permalink'; import RelativeTimestamp from 'soapbox/components/relative-timestamp'; import { Text } from 'soapbox/components/ui'; import ActionButton from 'soapbox/features/ui/components/action-button'; import { useAppSelector } from 'soapbox/hooks'; import { makeGetAccount } from 'soapbox/selectors'; import { shortNumberFormat } from 'soapbox/utils/numbers'; const getAccount = makeGetAccount(); interface IAccountCard { id: string, } const AccountCard: React.FC = ({ id }) => { const me = useAppSelector((state) => state.me); const account = useAppSelector((state) => getAccount(state, id)); const autoPlayGif = useAppSelector((state) => getSettings(state).get('autoPlayGif')); if (!account) return null; const followedBy = me !== account.id && account.relationship?.followed_by; return (
{followedBy &&
}

') && 'empty')} dangerouslySetInnerHTML={{ __html: account.note_emojified }} />
{shortNumberFormat(account.statuses_count)}
{shortNumberFormat(account.followers_count)}
{account.last_status_at === null ? : }
); }; export default AccountCard;