Rev 5953 | Rev 6539 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React, { useEffect, useState } from 'react'
import { getData } from '../../../helpers/fetchHelpers';
const ProfileInfo = ({
companyId,
socialNetworksUrl,
followers,
image
}) => {
const [errors, setErrors] = useState('')
const [socialNetworks, setSocialNetworks] = useState({
facebook: '',
twitter: '',
instagram: ''
});
useEffect(() => {
getData(socialNetworksUrl)
.then(resp => setSocialNetworks(resp))
.catch(err => setErrors(err))
}, []);
return (
<div class="main-left-sidebar">
<div class="user_profile">
<div class="user-pro-img">
<img
id="company-img"
src={
image
? `/storage/type/company/code/${companyId}/filename/${image}`
: ''
}
alt=""
/>
<div class="add-dp" id="OpenImgUpload">
<a href="#" class="btn-image-open">
<i class="fa fa-camera" />
</a>
</div>
</div>
<div class="user_pro_status">
<ul class="flw-status list-unstyled">
<li>
<span>Seguidores</span> <b>{followers}</b>
</li>
</ul>
</div>
<div class="user-social-network-ov">
<h3>
Redes Sociales
<a href="#" title="" class="btn-social-network-edit">
<i class="fa fa-pencil"></i>
</a>
</h3>
</div>
<ul id="social-networks" class="social_links list-unstyled">
<li>
<a href="https://www.facebook.com/cesamanagementsolutions" target="_blank" title="">
<i class="fa fa-facebook-square btn-social-network-edit" />
{socialNetworks.facebook}
</a>
</li>
<li>
<a href="https://twitter.com/CesaEduUy" title="" target="_blank">
<i class="fa fa-twitter btn-social-network-edit" />
{socialNetworks.twitter}
</a>
</li>
<li>
<a href="https://www.instagram.com/cesamanagement/" target="_blank" title="">
<i class="fa fa-instagram btn-social-network-edit" />
{socialNetworks.instagram}
</a>
</li>
</ul>
</div>
</div>
)
}
export default ProfileInfo