File size: 1,057 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// @flow
import React from 'react';
import { Link } from 'react-router-dom';
import { CommunityAvatar } from 'src/components/avatar';
import { CommunityActions } from './components/communityActions';
import { CommunityMeta } from './components/communityMeta';
import { ProfileContainer, CoverPhoto, ProfileAvatarContainer } from './style';
import type { CommunityInfoType } from 'shared/graphql/fragments/community/communityInfo';

type Props = {
  community: CommunityInfoType,
};

export const CommunityProfileCard = (props: Props) => {
  const { community } = props;

  return (
    <ProfileContainer data-cy="community-profile-card">
      <Link to={`/${community.slug}`}>
        <CoverPhoto src={community.coverPhoto} />
      </Link>

      <ProfileAvatarContainer>
        <CommunityAvatar
          showHoverProfile={false}
          size={60}
          community={community}
        />
      </ProfileAvatarContainer>

      <CommunityMeta community={community} />

      <CommunityActions community={community} />
    </ProfileContainer>
  );
};