Rev 5478 | Rev 5483 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React, { useEffect } from 'react'import { useDispatch } from 'react-redux'import { setIntlLabels } from '../../../../redux/intl/intl.action'import EmptySection from '../../../../shared/empty-section/EmptySection'import SuggestWidget from '../../../../shared/helpers/my-groups-helper/SuggestWidget'import ProfileInfo from '../../../components/ProfileInfo'import Overview from '../../../components/overview/Overview'import Experiences from '../../../components/experiences/Experiences'import Educations from '../../../components/educations/Educations'const View = ({userIdEncrypted,cover,overview,userExperiences,userEducations,formatted_address,months,userLanguages,userSkills,userAptitudes,userHobbiesAndInterests,CancelConnectionUrl,RequestConnectionUrl,profileId,labels,...profileProps}) => {const dispatch = useDispatch()useEffect(() => {dispatch(setIntlLabels(labels))}, [])return (<><section className="cover-sec"><imgid="user-cover-img"src={`/storage/type/user-cover/code/${userIdEncrypted}/${cover ? `filename/${cover}` : ''}`}alt=""/></section><main className="main-section-data container px-0"><ProfileInfo{...profileProps}id={userIdEncrypted}cancelUrl={CancelConnectionUrl}connectUrl={RequestConnectionUrl}/><section className="feed-section"><Overview overview={overview} userId={userIdEncrypted} /><ExperiencesuserId={userIdEncrypted}experiences={userExperiences}months={months}/><Educations educations={userEducations} userId={userIdEncrypted} /><div className="user-profile-extended-ov"><h3>{labels.LOCATION}</h3>{!formatted_address ? (<EmptySection align="left" message={labels.EMPTY} />) : (<p id="location-formatted_address">{formatted_address}</p>)}</div><div className="user-profile-extended-ov"><h3>{labels.LANGUAGES}</h3>{!userLanguages.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-languages">{userLanguages.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div><div className="user-profile-extended-ov"><h3>{labels.SKILLS}</h3>{!userSkills.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-skills">{userSkills.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div><div className="user-profile-extended-ov"><h3>{labels.APTITUDES}</h3>{!userAptitudes.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-skills">{userAptitudes.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div><div className="user-profile-extended-ov"><h3>{labels.HOBBIES_AND_INTERESTS}</h3>{!userHobbiesAndInterests.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-skills">{userHobbiesAndInterests.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div></section><SuggestWidgeturl={`/helpers/people-viewed-profile/${profileId}`}btnLabelAccept="Ver perfil"title="Quien ha visitado esta perfil"/></main></>)}export default View