Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3274 Rev 3537
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react';
2
import { useParams } from 'react-router-dom'
2
import { useParams } from 'react-router-dom';
3
import { useSelector } from 'react-redux'
3
import { useSelector } from 'react-redux';
4
import { Box, Grid } from '@mui/material'
4
import { Box, Grid } from '@mui/material';
5
 
5
 
6
import { useFetch } from '@hooks'
6
import { useFetch } from '@hooks';
7
import { formatObjectToArray } from '@utils'
7
import { formatObjectToArray } from '@utils';
8
 
8
 
9
import ProfileCard from '@components/profile/ProfileCard'
9
import ProfileCard from '@components/profile/ProfileCard';
10
import LocationCard from '@components/profile/location/LocationCard'
10
import LocationCard from '@components/profile/location/LocationCard';
11
import LanguagesCard from '@components/profile/languages/LanguagesCard'
11
import LanguagesCard from '@components/profile/languages/LanguagesCard';
12
import SkillsCard from '@components/profile/skills/SkillsCard'
12
import SkillsCard from '@components/profile/skills/SkillsCard';
13
import AptitudesCard from '@components/profile/aptitudes/AptitudesCard'
13
import AptitudesCard from '@components/profile/aptitudes/AptitudesCard';
14
import HobbiesCard from '@components/profile/hobbies/HobbiesCard'
14
import HobbiesCard from '@components/profile/hobbies/HobbiesCard';
15
import SuggestWidget from '@components/widgets/default/SuggestWidget'
15
import SuggestWidget from '@components/widgets/default/SuggestWidget';
16
import EducationsCard from '@components/profile/educations/educations-card'
16
import EducationsCard from '@components/profile/educations/educations-card';
17
import ExperiencesCard from '@components/profile/experiences/experiences-card'
17
import ExperiencesCard from '@components/profile/experiences/experiences-card';
Línea 18... Línea 18...
18
 
18
 
19
const ProfileViewPage = () => {
19
const ProfileViewPage = () => {
20
  const labels = useSelector(({ intl }) => intl.labels)
20
  const labels = useSelector(({ intl }) => intl.labels);
Línea 21... Línea 21...
21
  const { uuid } = useParams()
21
  const { uuid } = useParams();
Línea 22... Línea 22...
22
 
22
 
23
  const { data: profile } = useFetch(`/profile/view/${uuid}`)
23
  const { data: profile } = useFetch(`/profile/view/${uuid}`);
24
 
24
 
25
  return (
25
  return (
26
    <Grid container spacing={1}>
26
    <Grid container spacing={1}>
27
      <Grid item xs md={8} spacing={1} direction='column'>
-
 
28
        <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>
27
      <Grid item xs md={8} spacing={1} direction='column'>
-
 
28
        <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>
-
 
29
          <ProfileCard
-
 
30
            cover={profile.cover}
-
 
31
            avatar={profile.image}
-
 
32
            name={profile.full_name}
-
 
33
            description={profile.overview}
-
 
34
            address={profile.formatted_address}
-
 
35
            coverUrl={profile.link_cover_upload}
-
 
36
            avatarUrl={profile.link_image_upload}
-
 
37
            coverSize={profile.image_size_cover}
29
          <ProfileCard {...profile} />
38
            avatarSize={profile.image_size_profile}
-
 
39
            requestConnection={profile.request_connection}
-
 
40
            linkRequest={profile.link_request}
-
 
41
            linkCancel={profile.link_cancel}
-
 
42
            linkInmail={profile.link_inmail}
30
 
43
            following={profile.following}
-
 
44
            totalConnections={profile.follower}
31
          <ExperiencesCard
45
            facebook={profile.facebook}
Línea -... Línea 46...
-
 
46
            twitter={profile.twitter}
-
 
47
            instagram={profile.instagram}
32
            experiences={profile?.user_experiences}
48
          />
Línea 33... Línea 49...
33
            uuid={uuid}
49
 
Línea 34... Línea -...
34
          />
-
 
35
 
50
          <ExperiencesCard experiences={profile?.user_experiences} uuid={uuid} />
36
          <EducationsCard educations={profile?.user_educations} uuid={uuid} />
-
 
37
 
-
 
Línea 38... Línea -...
38
          <LocationCard address={profile?.formatted_address} uuid={uuid} />
-
 
39
 
51
 
40
          <LanguagesCard
-
 
41
            languages={formatObjectToArray(profile?.user_languages)}
-
 
Línea 42... Línea -...
42
            uuid={uuid}
-
 
43
          />
52
          <EducationsCard educations={profile?.user_educations} uuid={uuid} />
44
 
-
 
45
          <SkillsCard
-
 
Línea 46... Línea 53...
46
            skills={formatObjectToArray(profile?.user_skills)}
53
 
47
            uuid={uuid}
54
          <LocationCard address={profile?.formatted_address} uuid={uuid} />
48
          />
55
 
49
 
56
          <LanguagesCard languages={formatObjectToArray(profile?.user_languages)} uuid={uuid} />
Línea 66... Línea 73...
66
            title={labels.who_has_seen_this_profile}
73
            title={labels.who_has_seen_this_profile}
67
          />
74
          />
68
        )}
75
        )}
69
      </Grid>
76
      </Grid>
70
    </Grid>
77
    </Grid>
71
  )
78
  );
72
}
79
};
Línea 73... Línea 80...
73
 
80