File size: 903 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 type { UserInfoType } from 'shared/graphql/fragments/user/userInfo';
import { UserAvatar } from 'src/components/avatar';
import { UserActions } from './components/userActions';
import { UserMeta } from './components/userMeta';
import {
  ProfileContainer,
  CoverPhoto,
  RoundProfileAvatarContainer,
} from './style';

type Props = {
  user: UserInfoType,
};

export const UserProfileCard = (props: Props) => {
  const { user } = props;

  return (
    <ProfileContainer>
      <Link to={`/users/${user.username}`}>
        <CoverPhoto src={user.coverPhoto} />
      </Link>

      <RoundProfileAvatarContainer>
        <UserAvatar showHoverProfile={false} size={60} user={user} />
      </RoundProfileAvatarContainer>

      <UserMeta user={user} />

      <UserActions user={user} />
    </ProfileContainer>
  );
};