Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'import { Avatar } from '@mui/material'import { useSelector } from 'react-redux'import parse from 'html-react-parser'const UserInfo = ({cover = '',image = '',fullName = '',description = '',visits = 0,connections = 0,}) => {const labels = useSelector(({ intl }) => intl.labels)return (<div className="sidebar__top">{cover && (<imgsrc="./static/profile_2.jpg"alt="Profile cover"className="sidebar__cover"/>)}<Avatarsrc={image}alt={`${fullName} profile image`}sx={{ width: '60px', height: '60px' }}/><h2>{parse(fullName)}</h2>{parse(description)}<StatItemtitle={labels.who_has_seen_my_profile}number={visits}url="/profile/people-viewed-profile"/><StatItemtitle={labels.connections}number={connections}url="/connection/my-connections"/></div>)}const StatItem = ({ title = '', number = 0, url = '' }) => {return (<ahref={url}className="sidebar__stat"target="secondary"onClick={(e) => !url && e.preventDefault()}><span>{title}</span><span className="sidebar__stat-number">{number}</span></a>)}export default UserInfo