Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5473 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5473 Rev 5566
Línea 2... Línea 2...
2
import { axios } from '../../utils'
2
import { axios } from '../../utils'
3
import { addNotification } from '../../redux/notification/notification.actions'
3
import { addNotification } from '../../redux/notification/notification.actions'
4
import { useDispatch, useSelector } from 'react-redux'
4
import { useDispatch, useSelector } from 'react-redux'
5
import { Facebook, Instagram, Twitter } from '@mui/icons-material'
5
import { Facebook, Instagram, Twitter } from '@mui/icons-material'
6
import ConfirmModal from '../../shared/confirm-modal/ConfirmModal'
6
import ConfirmModal from '../../shared/confirm-modal/ConfirmModal'
-
 
7
import SocialNetworks from '../../shared/social-networks/SocialNetwors'
Línea 7... Línea 8...
7
 
8
 
8
const ProfileInfo = ({
9
const ProfileInfo = ({
9
  id,
10
  id,
10
  image,
11
  image,
-
 
12
  following,
11
  following,
13
  follower,
12
  facebook,
14
  facebook,
13
  twitter,
15
  twitter,
14
  instagram,
16
  instagram,
15
  showContact,
17
  showContact,
16
  fullName,
18
  fullName,
17
  linkInmail,
19
  linkInmail,
18
  connectUrl,
20
  connectUrl,
-
 
21
  cancelUrl,
19
  cancelUrl,
22
  isEdit,
20
}) => {
23
}) => {
21
  const [isAdded, setIsAdded] = useState(!connectUrl)
24
  const [isAdded, setIsAdded] = useState(!connectUrl)
22
  const [connectionUrl, setConnectionUrl] = useState(connectUrl || cancelUrl)
25
  const [connectionUrl, setConnectionUrl] = useState(connectUrl || cancelUrl)
Línea 60... Línea 63...
60
          }`}
63
          }`}
61
          alt="profile-image"
64
          alt="profile-image"
62
        />
65
        />
63
        <h3>{fullName}</h3>
66
        <h3>{fullName}</h3>
64
        <div className="row">
67
        <div className="row">
-
 
68
          {facebook && (
65
          <a href={facebook} target="_blank" rel="noreferrer">
69
            <a href={facebook} target="_blank" rel="noreferrer">
66
            <Facebook />
70
              <Facebook />
67
          </a>
71
            </a>
-
 
72
          )}
-
 
73
          {twitter && (
68
          <a href={twitter} target="_blank" rel="noreferrer">
74
            <a href={twitter} target="_blank" rel="noreferrer">
69
            <Twitter />
75
              <Twitter />
70
          </a>
76
            </a>
-
 
77
          )}
-
 
78
          {instagram && (
71
          <a href={instagram} target="_blank" rel="noreferrer">
79
            <a href={instagram} target="_blank" rel="noreferrer">
72
            <Instagram />
80
              <Instagram />
73
          </a>
81
            </a>
-
 
82
          )}
-
 
83
        </div>
-
 
84
        <div className="row">
-
 
85
          {following && (
-
 
86
            <span>
-
 
87
              <b>{following}</b>
-
 
88
              <br />
-
 
89
              Siguiendo
-
 
90
            </span>
-
 
91
          )}
-
 
92
          {follower && (
-
 
93
            <span>
-
 
94
              <b>{follower}</b>
-
 
95
              <br />
-
 
96
              Seguidores
-
 
97
            </span>
-
 
98
          )}
74
        </div>
99
        </div>
75
        <span>
-
 
76
          <b>{following}</b>
-
 
77
          <br />
-
 
78
          Seguidores
-
 
79
        </span>
-
 
80
        <div className="row ">
100
        <div className="row ">
81
          {showContact && (
101
          {showContact && (
82
            <>
102
            <>
83
              <button
103
              <button
84
                className={`btn btn-${isAdded ? 'secondary' : 'primary'}`}
104
                className={`btn btn-${isAdded ? 'secondary' : 'primary'}`}
Línea 92... Línea 112...
92
                {labels.MESSAGE}
112
                {labels.MESSAGE}
93
              </a>
113
              </a>
94
            </>
114
            </>
95
          )}
115
          )}
96
        </div>
116
        </div>
-
 
117
        {isEdit && (
-
 
118
          <SocialNetworks
-
 
119
            type="profile"
-
 
120
            profileId={id}
-
 
121
            facebook={facebook}
-
 
122
            instagram={instagram}
-
 
123
            twitter={twitter}
-
 
124
          />
-
 
125
        )}
97
      </div>
126
      </div>
98
      <ConfirmModal
127
      <ConfirmModal
99
        show={showConfirmModal}
128
        show={showConfirmModal}
100
        onClose={toggleConfirmationModal}
129
        onClose={toggleConfirmationModal}
101
        onAccept={connect}
130
        onAccept={connect}