Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 3730 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
import React from "react";
2
import { profileTypes } from "../../Profile.types";
3
import ProfileImg from "./profile-img/ProfileImg";
4
import SocialNetworks from "./social-networks/SocialNetworks";
5
 
6
const ProfileInfo = (props) => {
7
  // props destructuring
8
  const {
9
    entityId,
10
    profileId,
11
    image,
12
    following,
13
    follower,
14
    facebook,
15
    twitter,
16
    instagram,
17
    imageProfileCover,
18
    addNotification,
19
    profileType,
20
  } = props;
21
 
22
  let status;
23
  switch (profileType) {
24
    case profileTypes.USER:
25
      status = (
26
        <ul className="flw-status">
27
          <li>
28
            <span>Siguiendo</span>
29
            <b>{following}</b>
30
          </li>
31
          <li>
32
            <span>Seguidores</span>
33
            <b>{follower}</b>
34
          </li>
35
        </ul>
36
      );
37
      break;
38
    case profileTypes.COMPANY:
39
      status = (
40
        <ul className="flw-status">
41
          <li>
42
            <span>Seguidores</span>
43
            <b>{follower}</b>
44
          </li>
45
        </ul>
46
      );
47
      break;
48
 
49
    default:
50
      status = <ul className="flw-status">Sin Estado</ul>;
51
      break;
52
  }
53
 
54
  return (
55
    <div className="user_profile">
56
      <ProfileImg
57
        entityId={entityId}
58
        profileId={profileId}
59
        image={image}
60
        imageProfileCover={imageProfileCover}
61
        addNotification={addNotification}
62
        profileType={profileType}
63
      />
64
      {/* <!--user-pro-img end--> */}
65
      <div className="user_pro_status">{status}</div>
66
      {/* <!--user_pro_status end--> */}
67
      <SocialNetworks
68
        facebook={facebook}
69
        twitter={twitter}
70
        instagram={instagram}
71
        entityId={entityId}
72
        profileId={profileId}
73
        addNotification={addNotification}
74
        profileType={profileType}
75
      />
76
    </div>
77
  );
78
};
79
 
80
export default ProfileInfo;