Rev 6831 | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'
import { useSelector } from 'react-redux'
import parse from 'html-react-parser'
import Avatar from '../../UI/AvatarImage'
import StatItem from './StatItem'
const UserInfo = ({
cover = '',
image = '',
fullName = '',
description = '',
visits = 0,
connections = 0,
}) => {
const labels = useSelector(({ intl }) => intl.labels)
return (
<div className="sidebar__top">
{cover && (
<img
src="./static/profile_2.jpg"
alt="Profile cover"
className="sidebar__cover"
/>
)}
<Avatar imageUrl={image} size="xl" name={fullName} />
{fullName && <h2>{parse(fullName)}</h2>}
{description && parse(description)}
<StatItem
title={`¿${labels.whoe_has_seen_my_profile}?`}
number={visits}
url="/profile/people-viewed-profile"
/>
<StatItem
title={labels.connections}
number={connections}
url="/connection/my-connections"
/>
</div>
)
}
export default UserInfo