import { FormattedMessage } from 'react-intl'; import { useAppSelector } from 'mastodon/store'; import { TimelineHint } from './timeline_hint'; interface RemoteHintProps { accountId?: string; } export const RemoteHint: React.FC = ({ accountId }) => { const account = useAppSelector((state) => accountId ? state.accounts.get(accountId) : undefined, ); const domain = account?.acct ? account.acct.split('@')[1] : undefined; if ( !account || !account.url || account.acct !== account.username || !domain ) { return null; } return ( } label={ {domain} }} /> } /> ); };