Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev Autor Línea Nro. Línea
1847 stevensc 1
import React from 'react'
743 stevensc 2
import { useParams } from 'react-router-dom'
956 stevensc 3
import { Container, Grid } from '@mui/material'
4
 
1847 stevensc 5
import useFetch from '@app/hooks/useFetch'
963 stevensc 6
 
1847 stevensc 7
import ProfileCard from '@app/components/profile/ProfileCard'
8
import ExperiencesCard from '@app/components/profile/experiences/ExperiencesCard'
9
import EducationsCard from '@app/components/profile/educations/EducationsCard'
1849 stevensc 10
import LocationCard from '@app/components/profile/location/LocationCard'
11
import LanguagesCard from '@app/components/profile/languages/LanguagesCard'
5 stevensc 12
 
956 stevensc 13
import '../../styles/profile/profile.scss'
1853 stevensc 14
import SkillsCard from '@app/components/profile/skills/Skills'
956 stevensc 15
 
5 stevensc 16
const View = () => {
743 stevensc 17
  const { uuid } = useParams()
1847 stevensc 18
  const { data: profile } = useFetch(`/profile/my-profiles/edit/${uuid}`)
5 stevensc 19
 
1849 stevensc 20
  const {
1847 stevensc 21
    user_experiences,
22
    user_educations,
1853 stevensc 23
    formatted_address,
24
    user_languages,
25
    user_skills
26
    // user_aptitudes,
1849 stevensc 27
    // user_hobbies_and_interests,
28
  } = profile
5 stevensc 29
 
30
  return (
1847 stevensc 31
    <Container as='main' sx={{ p: 0 }}>
32
      <Grid container spacing={2}>
33
        <Grid
34
          item
35
          xs={12}
36
          sx={{
37
            display: 'flex',
38
            flexDirection: 'column',
39
            gap: 1
40
          }}
41
        >
42
          <ProfileCard
43
            {...profile}
44
            sizes={{
45
              image: profile.image_size_profile,
46
              cover: profile.image_size_cover
47
            }}
48
            uuid={profile.user_uuid}
49
            image={profile.image}
50
            cover={profile.cover}
51
          />
956 stevensc 52
 
1849 stevensc 53
          <ExperiencesCard experiences={user_experiences} uuid={uuid} edit />
956 stevensc 54
 
1849 stevensc 55
          <EducationsCard educations={user_educations} uuid={uuid} edit />
56
 
1851 stevensc 57
          <LocationCard address={formatted_address} uuid={uuid} edit />
1849 stevensc 58
 
59
          <LanguagesCard languages={user_languages} uuid={uuid} edit />
60
 
1853 stevensc 61
          <SkillsCard skills={user_skills} uuid={uuid} edit />
1849 stevensc 62
 
1853 stevensc 63
          {/*
1849 stevensc 64
          <ProfileWidget
65
            title={labels.aptitudes}
66
            onEdit={() => setModalShow('Aptitudes')}
67
            justEdit
68
          >
69
            <TagsList tags={aptitudes} />
70
          </ProfileWidget>
71
 
72
          <ProfileWidget
73
            title={labels.hobbies_and_interests}
74
            onEdit={() => setModalShow('Hobbies e Intereses')}
75
            justEdit
76
          >
77
            <TagsList tags={hobbiesAndInterests} />
78
          </ProfileWidget> */}
956 stevensc 79
        </Grid>
1847 stevensc 80
      </Grid>
81
    </Container>
743 stevensc 82
  )
83
}
5 stevensc 84
 
743 stevensc 85
export default View