Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 6539 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
6547 stevensc 1
import React, { useState } from 'react'
2
import CompanyImgModal from './CompanyImgModal';
6539 stevensc 3
import SocialNetworks from './SocialNetworks';
5925 stevensc 4
 
5
const ProfileInfo = ({
6
    companyId,
7
    socialNetworksUrl,
8
    followers,
6539 stevensc 9
    image,
10
    imageUploadUrl
5925 stevensc 11
}) => {
12
 
6539 stevensc 13
    const [isShowModal, setIsShowModal] = useState(false);
14
    const [companyImg, setCompanyImg] = useState(`/storage/type/company/code/${companyId}/filename/${image}`);
5925 stevensc 15
 
6539 stevensc 16
    const closeModal = () => setIsShowModal(false)
17
    const showModal = () => setIsShowModal(true)
5925 stevensc 18
 
19
    return (
6539 stevensc 20
        <div className="main-left-sidebar">
21
            <div className="user_profile">
22
                <div className="user-pro-img">
5992 stevensc 23
                    <img
24
                        id="company-img"
6539 stevensc 25
                        src={companyImg}
5992 stevensc 26
                        alt=""
27
                    />
6547 stevensc 28
                    <div className="add-dp">
6539 stevensc 29
                        <button
6547 stevensc 30
                            className="btn btn-image-open"
6539 stevensc 31
                            onClick={showModal}
32
                        >
33
                            <i className="fa fa-camera" />
34
                        </button>
5925 stevensc 35
                    </div>
5992 stevensc 36
                </div>
6539 stevensc 37
                <div className="user_pro_status">
38
                    <ul className="flw-status list-unstyled">
5925 stevensc 39
                        <li>
6539 stevensc 40
                            <span>Seguidores</span>
41
                            <b>{followers}</b>
5925 stevensc 42
                        </li>
43
                    </ul>
44
                </div>
6539 stevensc 45
                <SocialNetworks
46
                    socialNetworksUrl={socialNetworksUrl}
47
                />
6547 stevensc 48
                <CompanyImgModal
49
                    action={setCompanyImg}
50
                    closeModal={closeModal}
51
                    isOpen={isShowModal}
52
                    imageUploadUrl={imageUploadUrl}
53
                />
5925 stevensc 54
            </div>
55
        </div>
56
    )
57
}
58
 
59
export default ProfileInfo