import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Modal } from 'soapbox/components/ui'; import { useAppSelector } from 'soapbox/hooks'; import { statusToMentionsAccountIdsArray } from 'soapbox/reducers/compose'; import { makeGetStatus } from 'soapbox/selectors'; import Account from '../../reply_mentions/account'; import type { Account as AccountEntity, Status as StatusEntity } from 'soapbox/types/entities'; interface IReplyMentionsModal { onClose: (string: string) => void, } const ReplyMentionsModal: React.FC = ({ onClose }) => { const status = useAppSelector(state => makeGetStatus()(state, { id: state.compose.get('in_reply_to') })); const account = useAppSelector((state) => state.accounts.get(state.me)); const mentions = statusToMentionsAccountIdsArray(status, account); const author = (status?.account as AccountEntity).id; const onClickClose = () => { onClose('REPLY_MENTIONS'); }; return ( } onClose={onClickClose} closeIcon={require('@tabler/icons/icons/arrow-left.svg')} closePosition='left' >
{mentions.map(accountId => )}
); }; export default ReplyMentionsModal;