bigbuffet-rw/app/soapbox/hooks/useAccount.ts

9 lines
247 B
TypeScript
Raw Normal View History

2022-04-26 10:03:41 -07:00
import { useAppSelector } from 'soapbox/hooks';
import { makeGetAccount } from 'soapbox/selectors';
2022-12-20 14:45:29 -08:00
export const useAccount = (id: string) => {
const getAccount = makeGetAccount();
2022-04-26 10:03:41 -07:00
2022-12-20 14:45:29 -08:00
return useAppSelector((state) => getAccount(state, id));
};