Rev 4734 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
/* eslint-disable react/prop-types */import React, { useState } from 'react'import parse from 'html-react-parser'import Avatar from '../../../../shared/Avatar/Avatar'import ExpandLessIcon from '@mui/icons-material/ExpandLess'import ExpandMoreIcon from '@mui/icons-material/ExpandMore'import HelpersContainer from './HelpersContainer'import SocialNetworks from '../../../components/home-section/SocialNetworks'import StatItem from './StatItem'import './Sidebar.scss'const Sidebar = ({image,fullName,description,visits,connections,cover = null}) => {const [display, setDisplay] = useState(false)return (<div className='sidebar d-none d-md-flex'><div className={`sidebar__top ${!cover && 'pt-3'}`}>{cover && <img src='./static/profile_2.jpg' alt='Profile cover' className='sidebar__cover' />}<Avatar imageUrl={image} size='xl' name={fullName} /><h2>{parse(fullName)}</h2>{parse(description)}</div><div className={`sidebar__options ${display && 'show'}`}><div className='sidebar__stats'><StatItem title={ `¿${LABELS.WHO_HAS_SEEN_MY_PROFILE}?`} number={visits} url='/profile/people-viewed-profile' /><StatItem title={LABELS.CONNECTIONS} number={connections} url='/connection/my-connections' /></div><HelpersContainer /><SocialNetworks className='sidebar-apps__widget' /></div><footer className='sideabar__footer'><buttononClick={() => setDisplay(!display)}type='button'><span>{display ? LABELS.VIEW_LESS : LABELS.VIEW_MORE}</span>{display ? <ExpandLessIcon /> : <ExpandMoreIcon />}</button></footer></div>)}export default Sidebar