Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5483 | Rev 5489 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
5475 stevensc 1
import React, { useEffect } from 'react'
5473 stevensc 2
import { useDispatch } from 'react-redux'
3
import { setIntlLabels } from '../../../../redux/intl/intl.action'
5475 stevensc 4
 
5473 stevensc 5
import EmptySection from '../../../../shared/empty-section/EmptySection'
6
import SuggestWidget from '../../../../shared/helpers/my-groups-helper/SuggestWidget'
7
import ProfileInfo from '../../../components/ProfileInfo'
8
import Overview from '../../../components/overview/Overview'
5475 stevensc 9
import Experiences from '../../../components/experiences/Experiences'
5478 stevensc 10
import Educations from '../../../components/educations/Educations'
5483 stevensc 11
import Location from '../../../components/location/Location'
12
import Languages from '../../../components/languages/Languages'
5488 stevensc 13
import Skills from '../../../components/skills/Skills'
5473 stevensc 14
 
15
const View = ({
16
  userIdEncrypted,
17
  cover,
18
  overview,
19
  userExperiences,
20
  userEducations,
21
  formatted_address,
22
  months,
23
  userLanguages,
24
  userSkills,
25
  userAptitudes,
26
  userHobbiesAndInterests,
27
  CancelConnectionUrl,
28
  RequestConnectionUrl,
29
  profileId,
30
  labels,
31
  ...profileProps
32
}) => {
33
  const dispatch = useDispatch()
34
 
35
  useEffect(() => {
36
    dispatch(setIntlLabels(labels))
37
  }, [])
38
 
39
  return (
40
    <>
41
      <section className="cover-sec">
42
        <img
43
          id="user-cover-img"
44
          src={`/storage/type/user-cover/code/${userIdEncrypted}/${
45
            cover ? `filename/${cover}` : ''
46
          }`}
47
          alt=""
48
        />
49
      </section>
50
      <main className="main-section-data container px-0">
51
        <ProfileInfo
52
          {...profileProps}
53
          id={userIdEncrypted}
54
          cancelUrl={CancelConnectionUrl}
55
          connectUrl={RequestConnectionUrl}
56
        />
57
        <section className="feed-section">
5488 stevensc 58
          <Overview overview={overview} />
59
          <Experiences experiences={userExperiences} months={months} />
60
          <Educations educations={userEducations} />
61
          <Location address={formatted_address} />
62
          <Languages languages={userLanguages} />
63
          <Skills skills={userSkills} />
64
 
5473 stevensc 65
          <div className="user-profile-extended-ov">
66
            <h3>{labels.APTITUDES}</h3>
67
            {!userAptitudes.length ? (
68
              <EmptySection align="left" message={labels.EMPTY} />
69
            ) : (
70
              <ul id="list-skills">
71
                {userAptitudes.map(({ name, value }) => (
72
                  <li key={value}>
73
                    <a href="#" title="">
74
                      {name}
75
                    </a>
76
                  </li>
77
                ))}
78
              </ul>
79
            )}
80
          </div>
81
          <div className="user-profile-extended-ov">
82
            <h3>{labels.HOBBIES_AND_INTERESTS}</h3>
83
            {!userHobbiesAndInterests.length ? (
84
              <EmptySection align="left" message={labels.EMPTY} />
85
            ) : (
86
              <ul id="list-skills">
87
                {userHobbiesAndInterests.map(({ name, value }) => (
88
                  <li key={value}>
89
                    <a href="#" title="">
90
                      {name}
91
                    </a>
92
                  </li>
93
                ))}
94
              </ul>
95
            )}
96
          </div>
97
        </section>
98
        <SuggestWidget
99
          url={`/helpers/people-viewed-profile/${profileId}`}
100
          btnLabelAccept="Ver perfil"
101
          title="Quien ha visitado esta perfil"
102
        />
103
      </main>
104
    </>
105
  )
106
}
107
 
108
export default View