import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; import GroupAvatar from 'soapbox/components/groups/group-avatar'; import { HStack, Icon, Stack, Text } from 'soapbox/components/ui'; import GroupActionButton from 'soapbox/features/group/components/group-action-button'; import { Group as GroupEntity } from 'soapbox/types/entities'; import { shortNumberFormat } from 'soapbox/utils/numbers'; interface IGroupListItem { group: GroupEntity withJoinAction?: boolean } const GroupListItem = (props: IGroupListItem) => { const { group, withJoinAction = true } = props; return ( {group.locked ? ( ) : ( )} {typeof group.members_count !== 'undefined' && ( <> {shortNumberFormat(group.members_count)} {' '} )} {withJoinAction && ( )} ); }; export default GroupListItem;