import { OrderedSet as ImmutableOrderedSet } from 'immutable'; import React from 'react'; import { FormattedMessage } from 'react-intl'; import ScrollableList from 'soapbox/components/scrollable_list'; import { Modal, Spinner } from 'soapbox/components/ui'; import AccountContainer from 'soapbox/containers/account_container'; import { useAppSelector } from 'soapbox/hooks'; import { makeGetAccount } from 'soapbox/selectors'; const getAccount = makeGetAccount(); interface IFamiliarFollowersModal { accountId: string, onClose: (string: string) => void, } const FamiliarFollowersModal = ({ accountId, onClose }: IFamiliarFollowersModal) => { const account = useAppSelector(state => getAccount(state, accountId)); const familiarFollowerIds: ImmutableOrderedSet = useAppSelector(state => state.user_lists.getIn(['familiar_followers', accountId])); const onClickClose = () => { onClose('FAMILIAR_FOLLOWERS'); }; let body; if (!account || !familiarFollowerIds) { body = ; } else { const emptyMessage = }} />; body = ( {familiarFollowerIds.map(id => , )} ); } return ( }} />} onClose={onClickClose} > {body} ); }; export default FamiliarFollowersModal;