Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1853 | Rev 1862 | 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'
1854 stevensc 8
import AptitudesCard from '@app/components/profile/aptitudes/AptitudesCard'
9
import EducationsCard from '@app/components/profile/educations/EducationsCard'
1847 stevensc 10
import ExperiencesCard from '@app/components/profile/experiences/ExperiencesCard'
1854 stevensc 11
import LanguagesCard from '@app/components/profile/languages/LanguagesCard'
1849 stevensc 12
import LocationCard from '@app/components/profile/location/LocationCard'
1854 stevensc 13
import SkillsCard from '@app/components/profile/skills/SkillsCard'
14
import HobbiesCard from '@app/components/profile/hobbies/HobbiesCard'
5 stevensc 15
 
956 stevensc 16
import '../../styles/profile/profile.scss'
17
 
5 stevensc 18
const View = () => {
743 stevensc 19
  const { uuid } = useParams()
1847 stevensc 20
  const { data: profile } = useFetch(`/profile/my-profiles/edit/${uuid}`)
5 stevensc 21
 
1849 stevensc 22
  const {
1847 stevensc 23
    user_experiences,
24
    user_educations,
1853 stevensc 25
    formatted_address,
26
    user_languages,
1854 stevensc 27
    user_skills,
28
    user_aptitudes,
29
    user_hobbies_and_interests
1849 stevensc 30
  } = profile
5 stevensc 31
 
32
  return (
1847 stevensc 33
    <Container as='main' sx={{ p: 0 }}>
34
      <Grid container spacing={2}>
35
        <Grid
36
          item
37
          xs={12}
38
          sx={{
39
            display: 'flex',
40
            flexDirection: 'column',
41
            gap: 1
42
          }}
43
        >
44
          <ProfileCard
45
            {...profile}
46
            sizes={{
47
              image: profile.image_size_profile,
48
              cover: profile.image_size_cover
49
            }}
50
            uuid={profile.user_uuid}
51
            image={profile.image}
52
            cover={profile.cover}
53
          />
956 stevensc 54
 
1849 stevensc 55
          <ExperiencesCard experiences={user_experiences} uuid={uuid} edit />
956 stevensc 56
 
1849 stevensc 57
          <EducationsCard educations={user_educations} uuid={uuid} edit />
58
 
1851 stevensc 59
          <LocationCard address={formatted_address} uuid={uuid} edit />
1849 stevensc 60
 
61
          <LanguagesCard languages={user_languages} uuid={uuid} edit />
62
 
1853 stevensc 63
          <SkillsCard skills={user_skills} uuid={uuid} edit />
1849 stevensc 64
 
1854 stevensc 65
          <AptitudesCard aptitudes={user_aptitudes} uuid={uuid} edit />
1849 stevensc 66
 
1854 stevensc 67
          <HobbiesCard hobbies={user_hobbies_and_interests} uuid={uuid} edit />
956 stevensc 68
        </Grid>
1847 stevensc 69
      </Grid>
70
    </Container>
743 stevensc 71
  )
72
}
5 stevensc 73
 
743 stevensc 74
export default View