Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
5473 stevensc 1
/* eslint-disable indent */
2
/* eslint-disable react/prop-types */
3
/* eslint-disable camelcase */
4
import React from 'react'
5
import ProfileCard from '../components/ProfileCard'
6
import ProfileWidget from '../components/ProfileWidget'
7
import ExperienceCard from '../components/cards/ExperienceCard'
8
import EducationCard from '../components/cards/EducationCard'
9
import EmptySection from '../../../../../shared/empty-section/EmptySection'
10
import ItemsList from '../components/cards/ItemsList'
11
import SuggestionWidget from '../../../../../shared/widgets/SuggestionWidget'
12
import '../styles/index.scss'
13
 
14
const View = (userInfo) => {
15
    const {
16
        userExperiences,
17
        userEducations,
18
        userLanguages,
19
        userSkills,
20
        userAptitudes,
21
        userHobbiesAndInterests
22
    } = userInfo
23
    return (
24
        <main className='w-100'>
25
            <div className='container profile__layout'>
26
                <div className="main d-flex flex-column" style={{ gap: '.5rem' }}>
27
                    <ProfileCard {...userInfo} />
28
                    <ProfileWidget title={LABELS.EXPERIENCE}>
29
                        {!userExperiences.length
30
                            ? <EmptySection align='left' message={LABELS.EMPTY} />
31
                            : userExperiences.map((experience, index) => {
32
                                return <ExperienceCard
33
                                    key={index}
34
                                    experience={experience}
35
                                    months={userInfo.months}
36
                                />
37
                            })}
38
                    </ProfileWidget>
39
                    <ProfileWidget title={LABELS.EDUCATION}>
40
                        {!userEducations.length
41
                            ? <EmptySection align='left' message={LABELS.EMPTY} />
42
                            : userEducations.map((education, index) => {
43
                                return <EducationCard
44
                                    key={index}
45
                                    education={education}
46
                                />
47
                            })}
48
                    </ProfileWidget>
49
                    <ProfileWidget title={LABELS.LANGUAGES}>
50
                        {!userLanguages.length
51
                            ? <EmptySection align='left' message={LABELS.EMPTY} />
52
                            : <ItemsList value={userLanguages} />
53
                        }
54
                    </ProfileWidget>
55
                    <ProfileWidget title={LABELS.SKILLS}>
56
                        {!userSkills.length
57
                            ? <EmptySection align='left' message={LABELS.EMPTY} />
58
                            : <ItemsList value={userSkills} />
59
                        }
60
                    </ProfileWidget>
61
                    <ProfileWidget title={LABELS.APTITUDES}>
62
                        {!userAptitudes.length
63
                            ? <EmptySection align='left' message={LABELS.EMPTY} />
64
                            : <ItemsList value={userAptitudes} />
65
                        }
66
                    </ProfileWidget>
67
                    <ProfileWidget title={LABELS.HOBBIES_AND_INTERESTS}>
68
                        {!userHobbiesAndInterests.length
69
                            ? <EmptySection align='left' message={LABELS.EMPTY} />
70
                            : <ItemsList value={userHobbiesAndInterests} />
71
                        }
72
                    </ProfileWidget>
73
                </div>
74
                <div className="aside">
75
                    <SuggestionWidget url={`/helpers/people-viewed-profile/${userInfo.profileId}`} title={LABELS.WHO_HAS_SEEN_THIS_PROFILE} />
76
                </div>
77
 
78
            </div>
79
        </main>
80
    )
81
}
82
 
83
export default View