bigbuffet-rw/app/soapbox/features/compose/components/autosuggest_account.tsx
marcin mikołajczak 98ff406ddf typescript
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-04-10 12:46:25 +02:00

21 lines
559 B
TypeScript

import React 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 = makeGetAccount();
const account = useAppSelector((state) => getAccount(state, id));
if (!account) return null;
return <Account account={account} hideActions showProfileHoverCard={false} />;
};
export default AutosuggestAccount;