bigbuffet-rw/app/soapbox/features/compose/components/autosuggest-account.tsx
Alex Gleason 6444632324
Revert "Merge branch 'autosuggest-profiles-fix' into 'develop'"
This reverts commit 9df92e91e7, reversing
changes made to 39b4ee9f09.
2022-11-20 12:27:30 -06:00

21 lines
593 B
TypeScript

import React, { useCallback } from 'react';
import Account from 'soapbox/components/account';
import { useAppSelector } from 'soapbox/hooks';
import { makeGetAccount } from 'soapbox/selectors';
interface IAutosuggestAccount {
id: string,
}
const AutosuggestAccount: React.FC<IAutosuggestAccount> = ({ id }) => {
const getAccount = useCallback(makeGetAccount(), []);
const account = useAppSelector((state) => getAccount(state, id));
if (!account) return null;
return <Account account={account} hideActions showProfileHoverCard={false} />;
};
export default AutosuggestAccount;