Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev Autor Línea Nro. Línea
5 stevensc 1
import React from 'react'
966 stevensc 2
import { Link } from 'react-router-dom'
967 stevensc 3
import { Avatar, Box } from '@mui/material'
966 stevensc 4
import { Visibility, Group, Share } from '@mui/icons-material'
5 stevensc 5
import parse from 'html-react-parser'
6
 
966 stevensc 7
import TagsList from '../UI/TagsList'
8
import StyledContainer from '../widgets/WidgetLayout'
5 stevensc 9
 
10
const SearchItem = ({
11
  name,
12
  industry,
13
  description,
14
  skills,
15
  common_connection,
16
  views,
17
  image,
18
  company_name,
19
  title,
20
  url,
21
  followers,
22
  company_size,
892 stevensc 23
  view_common_connection
5 stevensc 24
}) => {
25
  return (
966 stevensc 26
    <StyledContainer>
967 stevensc 27
      <StyledContainer.Body>
28
        <Box display='flex' justifyContent='space-between'>
29
          <Box display='inline-flex' alignItems='center' gap={2}>
30
            <Avatar src={image} sx={{ width: 60, height: 60 }} />
5 stevensc 31
 
967 stevensc 32
            <Box display='flex' flexDirection='column'>
33
              <Link to={url}>
34
                <h2>{title || name}</h2>
35
              </Link>
36
              {company_name && <h4>{company_name}</h4>}
37
              {company_size && <p>Empresa {company_size}</p>}
38
              {industry && <p>{industry}</p>}
39
            </Box>
40
          </Box>
41
 
42
          <Box display='inline-flex' alignItems='center' gap={2}>
43
            {!company_name && view_common_connection && (
44
              <span>
45
                <Share />
46
                {common_connection} comunes
47
              </span>
48
            )}
49
 
50
            {followers ? (
51
              <span>
52
                <Group />
53
                {followers}
54
              </span>
55
            ) : null}
56
 
57
            {views ? (
58
              <span>
59
                <Visibility />
60
                {views}
61
              </span>
62
            ) : null}
63
          </Box>
64
        </Box>
65
 
66
        {description && parse(description)}
67
 
68
        <TagsList tags={Object.values(skills)} />
69
      </StyledContainer.Body>
966 stevensc 70
    </StyledContainer>
5 stevensc 71
  )
72
}
73
 
74
export default SearchItem