Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 5 | Rev 2907 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5 Rev 2902
Línea 1... Línea 1...
1
import React, { lazy } from 'react'
1
import React from 'react'
-
 
2
import { useParams } from 'react-router-dom'
2
import { useSelector } from 'react-redux'
3
import { useSelector } from 'react-redux'
-
 
4
import { Grid } from '@mui/material'
Línea 3... Línea -...
3
 
-
 
4
// const ProfileView = lazy(() => import('../../layouts/profile-view/ProfileView'))
5
 
5
const ProfileViewLinkedIn = lazy(() =>
6
import { useFetch } from '@hooks'
6
  import('../../layouts/profile-view/ProfileViewLinkedIn')
7
import { formatObjectToArray } from '@utils'
-
 
8
 
-
 
9
import ProfileCard from '@components/profile/ProfileCard'
-
 
10
import ExperiencesCard from '@components/profile/experiences/ExperiencesCard'
-
 
11
import EducationsCard from '@components/profile/educations/EducationsCard'
-
 
12
import LocationCard from '@components/profile/location/LocationCard'
-
 
13
import LanguagesCard from '@components/profile/languages/LanguagesCard'
-
 
14
import SkillsCard from '@components/profile/skills/SkillsCard'
-
 
15
import AptitudesCard from '@components/profile/aptitudes/AptitudesCard'
-
 
16
import HobbiesCard from '@components/profile/hobbies/HobbiesCard'
Línea 7... Línea 17...
7
)
17
import SuggestWidget from '@components/widgets/default/SuggestWidget'
-
 
18
 
-
 
19
const ProfileViewPage = () => {
8
 
20
  const { uuid } = useParams()
-
 
21
  const { data: profile } = useFetch(`/profile/view/${uuid}`)
-
 
22
  const labels = useSelector(({ intl }) => intl.labels)
-
 
23
 
-
 
24
  return (
-
 
25
    <Grid container spacing={2}>
-
 
26
      <Grid item xs={12} md={8} display='flex' direction='column' gap={2}>
-
 
27
        <ProfileCard {...profile} />
-
 
28
 
-
 
29
        <ExperiencesCard experiences={profile?.user_experiences} uuid={uuid} />
-
 
30
 
-
 
31
        <EducationsCard educations={profile?.user_educations} uuid={uuid} />
-
 
32
 
-
 
33
        <LocationCard address={profile?.formatted_address} uuid={uuid} />
-
 
34
 
-
 
35
        <LanguagesCard
-
 
36
          languages={formatObjectToArray(profile?.user_languages)}
-
 
37
          uuid={uuid}
-
 
38
        />
-
 
39
 
-
 
40
        <SkillsCard
-
 
41
          skills={formatObjectToArray(profile?.user_skills)}
-
 
42
          uuid={uuid}
-
 
43
        />
-
 
44
 
-
 
45
        <AptitudesCard
-
 
46
          aptitudes={formatObjectToArray(profile?.user_aptitudes)}
-
 
47
          uuid={uuid}
-
 
48
        />
-
 
49
 
-
 
50
        <HobbiesCard
-
 
51
          hobbies={formatObjectToArray(profile?.user_hobbies_and_interests)}
-
 
52
          uuid={uuid}
Línea 9... Línea 53...
9
const ProfileViewPage = () => {
53
        />
10
  const { theme_id } = useSelector(({ auth }) => auth)
54
      </Grid>
11
 
55
 
-
 
56
      <Grid item xs={12} md={4}>
-
 
57
        {profile?.user_profile_id && (
12
  switch (theme_id) {
58
          <SuggestWidget
13
    /* case 1:
59
            url={`/helpers/people-viewed-profile/${profile?.user_profile_id}`}
14
      return <ProfileView />
60
            title={labels.who_has_seen_this_profile}
15
    case 2:
61
          />
16
      return <ProfileViewLinkedIn /> */
62
        )}
17
    default:
63
      </Grid>
Línea 18... Línea 64...
18
      return <ProfileViewLinkedIn />
64
    </Grid>