Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Autoría | Ultima modificación | Ver Log |

/* eslint-disable react/prop-types */
import React from 'react'
import { connect } from 'react-redux'
import { addNotification } from '../../../../redux/notification/notification.actions'
import { profileTypes } from '../../../../shared/profile/Profile.types'
import CoverSection from '../../../../shared/profile/edit/cover-section/CoverSection'

import Aptitudes from '../aptitudes/Aptitudes'
import Educations from '../educations/Educations'
import Experiences from '../experiences/Experiences'
import HobbiesAndInterests from '../hobbies-and-interests/HobbiesAndInterests'
import Languages from '../languages/Languages'
import Location from '../location/Location'
import Overview from '../overview/Overview'
import Skills from '../skills/Skills'

const Edit = ({
  userIdEncrypted,
  userProfileIdEncrypted,
  cover,
  image,
  following,
  follower,
  facebook,
  twitter,
  instagram,
  fullName,
  overview,
  userExperiences,
  months,
  userEducations,
  formattedAddress,
  userLanguages,
  userSkills,
  userAptitudes,
  userHobbiesAndInterests,
  imageSizeCover,
  imageProfileCover,
  companySizesOptions,
  degreesOptions,
  industriesOptions,
  languagesOptions,
  skillsOptions,
  aptitudesOptions,
  hobbiesAndInterestsOptions,
  addNotification, // redux action
}) => {
  return (
    <main>
      <CoverSection
        cover={cover}
        entityId={userIdEncrypted}
        profileId={userProfileIdEncrypted}
        imageSizeCover={imageSizeCover}
        coverType={profileTypes.USER}
        addNotification={addNotification}
      />
      <section className="container main-section-data">
        <div className="main-left-sidebar">
          <ProfileInfo
            entityId={userIdEncrypted}
            profileId={userProfileIdEncrypted}
            image={image}
            following={following}
            follower={follower}
            facebook={facebook}
            twitter={twitter}
            instagram={instagram}
            imageProfileCover={imageProfileCover}
            addNotification={addNotification}
            profileType={profileTypes.USER}
          />
        </div>
        <div className="feed-section">
          <div className="user-tab-sec rewivew">
            <h3>{fullName}</h3>
          </div>
          <Overview
            overview={overview}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
          <Experiences
            userExperiences={userExperiences}
            months={months}
            companySizesOptions={companySizesOptions}
            industriesOptions={industriesOptions}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
          <Educations
            userEducations={userEducations}
            degreesOptions={degreesOptions}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
          <Location
            formattedAddress={formattedAddress}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
          <Languages
            userLanguages={userLanguages}
            languagesOptions={languagesOptions}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
          <Skills
            userSkills={userSkills}
            skillsOptions={skillsOptions}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
          <Aptitudes
            userAptitudes={userAptitudes}
            aptitudesOptions={aptitudesOptions}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
          <HobbiesAndInterests
            userHobbiesAndInterests={userHobbiesAndInterests}
            hobbiesAndInterestsOptions={hobbiesAndInterestsOptions}
            userIdEncrypted={userProfileIdEncrypted}
            addNotification={addNotification}
          />
        </div>
        <div className="right-sidebar"></div>
      </section>
    </main>
  )
}

const mapDispatchToProps = {
  addNotification: (notification) => addNotification(notification),
}

export default connect(null, mapDispatchToProps)(Edit)