Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 967 Rev 968
Línea 1... Línea 1...
1
import React from 'react'
1
import React, { useMemo } from 'react'
2
import { Link } from 'react-router-dom'
2
import { Link } from 'react-router-dom'
3
import { Avatar, Box } from '@mui/material'
3
import { Avatar, Box } from '@mui/material'
4
import { Visibility, Group, Share } from '@mui/icons-material'
4
import { Visibility, Group, Share } from '@mui/icons-material'
5
import parse from 'html-react-parser'
-
 
Línea 6... Línea 5...
6
 
5
 
7
import TagsList from '../UI/TagsList'
6
import TagsList from '../UI/TagsList'
-
 
7
import StyledContainer from '../widgets/WidgetLayout'
Línea 8... Línea 8...
8
import StyledContainer from '../widgets/WidgetLayout'
8
import Paraphrase from '../UI/Paraphrase'
9
 
9
 
10
const SearchItem = ({
10
const SearchItem = ({
11
  name,
11
  name,
Línea 20... Línea 20...
20
  url,
20
  url,
21
  followers,
21
  followers,
22
  company_size,
22
  company_size,
23
  view_common_connection
23
  view_common_connection
24
}) => {
24
}) => {
-
 
25
  const userSkills = useMemo(
-
 
26
    () =>
-
 
27
      Object.values(skills).map((skill) => {
-
 
28
        return { value: skill[0], name: skill[1] }
-
 
29
      }),
-
 
30
    [skills]
-
 
31
  )
-
 
32
 
25
  return (
33
  return (
26
    <StyledContainer>
34
    <StyledContainer>
27
      <StyledContainer.Body>
35
      <StyledContainer.Body>
-
 
36
        <Box
-
 
37
          display='flex'
28
        <Box display='flex' justifyContent='space-between'>
38
          justifyContent='space-between'
-
 
39
          alignItems='flex-start'
-
 
40
        >
29
          <Box display='inline-flex' alignItems='center' gap={2}>
41
          <Box display='inline-flex' alignItems='center' gap={1}>
30
            <Avatar src={image} sx={{ width: 60, height: 60 }} />
42
            <Avatar src={image} sx={{ width: 60, height: 60 }} />
Línea 31... Línea 43...
31
 
43
 
32
            <Box display='flex' flexDirection='column'>
44
            <Box display='flex' flexDirection='column'>
33
              <Link to={url}>
45
              <Link to={url}>
Línea 37... Línea 49...
37
              {company_size && <p>Empresa {company_size}</p>}
49
              {company_size && <p>Empresa {company_size}</p>}
38
              {industry && <p>{industry}</p>}
50
              {industry && <p>{industry}</p>}
39
            </Box>
51
            </Box>
40
          </Box>
52
          </Box>
Línea 41... Línea 53...
41
 
53
 
42
          <Box display='inline-flex' alignItems='center' gap={2}>
54
          <Box display='inline-flex' alignItems='center' gap={1}>
43
            {!company_name && view_common_connection && (
55
            {!company_name && view_common_connection && (
44
              <span>
56
              <span>
45
                <Share />
57
                <Share />
46
                {common_connection} comunes
58
                {common_connection} comunes
Línea 61... Línea 73...
61
              </span>
73
              </span>
62
            ) : null}
74
            ) : null}
63
          </Box>
75
          </Box>
64
        </Box>
76
        </Box>
Línea 65... Línea 77...
65
 
77
 
Línea 66... Línea 78...
66
        {description && parse(description)}
78
        <Paraphrase>{description || ''}</Paraphrase>
67
 
79
 
68
        <TagsList tags={Object.values(skills)} />
80
        <TagsList tags={userSkills} />
69
      </StyledContainer.Body>
81
      </StyledContainer.Body>
70
    </StyledContainer>
82
    </StyledContainer>