Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 5953 | Rev 6539 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
5925 stevensc 1
import React, { useEffect, useState } from 'react'
2
import { getData } from '../../../helpers/fetchHelpers';
3
 
4
const ProfileInfo = ({
5
    companyId,
6
    socialNetworksUrl,
7
    followers,
8
    image
9
}) => {
10
 
11
    const [errors, setErrors] = useState('')
12
    const [socialNetworks, setSocialNetworks] = useState({
13
        facebook: '',
14
        twitter: '',
15
        instagram: ''
16
    });
17
 
18
    useEffect(() => {
19
        getData(socialNetworksUrl)
20
            .then(resp => setSocialNetworks(resp))
21
            .catch(err => setErrors(err))
22
 
23
    }, []);
24
 
25
    return (
5992 stevensc 26
        <div class="main-left-sidebar">
27
            <div class="user_profile">
28
                <div class="user-pro-img">
29
                    <img
30
                        id="company-img"
31
                        src={
32
                            image
33
                                ? `/storage/type/company/code/${companyId}/filename/${image}`
34
                                : ''
35
                        }
36
                        alt=""
37
                    />
38
                    <div class="add-dp" id="OpenImgUpload">
39
                        <a href="#" class="btn-image-open">
40
                            <i class="fa fa-camera" />
41
                        </a>
5925 stevensc 42
                    </div>
5992 stevensc 43
                </div>
44
                <div class="user_pro_status">
45
                    <ul class="flw-status list-unstyled">
5925 stevensc 46
                        <li>
5992 stevensc 47
                            <span>Seguidores</span> <b>{followers}</b>
5925 stevensc 48
                        </li>
49
                    </ul>
50
                </div>
5992 stevensc 51
                <div class="user-social-network-ov">
52
                    <h3>
53
                        Redes Sociales
54
                        <a href="#" title="" class="btn-social-network-edit">
55
                            <i class="fa fa-pencil"></i>
56
                        </a>
57
                    </h3>
58
                </div>
59
                <ul id="social-networks" class="social_links list-unstyled">
60
                    <li>
61
                        <a href="https://www.facebook.com/cesamanagementsolutions" target="_blank" title="">
62
                            <i class="fa fa-facebook-square btn-social-network-edit" />
63
                            {socialNetworks.facebook}
64
                        </a>
65
                    </li>
66
                    <li>
67
                        <a href="https://twitter.com/CesaEduUy" title="" target="_blank">
68
                            <i class="fa fa-twitter btn-social-network-edit" />
69
                            {socialNetworks.twitter}
70
                        </a>
71
                    </li>
72
                    <li>
73
                        <a href="https://www.instagram.com/cesamanagement/" target="_blank" title="">
74
                            <i class="fa fa-instagram btn-social-network-edit" />
75
                            {socialNetworks.instagram}
76
                        </a>
77
                    </li>
78
                </ul>
5925 stevensc 79
            </div>
80
        </div>
81
    )
82
}
83
 
84
export default ProfileInfo