import React, { forwardRef } from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; import GroupAvatar from 'soapbox/components/groups/group-avatar'; import { Button, HStack, Stack, Text } from 'soapbox/components/ui'; import GroupMemberCount from 'soapbox/features/group/components/group-member-count'; import GroupPrivacy from 'soapbox/features/group/components/group-privacy'; import { useJoinGroup } from 'soapbox/hooks/api'; import { Group as GroupEntity } from 'soapbox/types/entities'; interface IGroup { group: GroupEntity width?: number } const GroupGridItem = forwardRef((props: IGroup, ref: React.ForwardedRef) => { const { group, width = 'auto' } = props; const joinGroup = useJoinGroup(group); const onJoinGroup = () => joinGroup.mutate(group); return (
{group.header && ( Group cover )}
); }); export default GroupGridItem;