Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 966 Rev 967
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { Link } from 'react-router-dom'
2
import { Link } from 'react-router-dom'
3
import { Avatar } 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 styled from 'styled-components'
-
 
6
import parse from 'html-react-parser'
5
import parse from 'html-react-parser'
Línea 7... Línea 6...
7
 
6
 
8
import TagsList from '../UI/TagsList'
7
import TagsList from '../UI/TagsList'
Línea 9... Línea -...
9
import StyledContainer from '../widgets/WidgetLayout'
-
 
10
 
-
 
11
const EntityHeader = styled.div`
-
 
12
  align-items: center;
-
 
13
  display: flex;
-
 
14
  gap: 0.5rem;
-
 
15
`
-
 
16
 
-
 
17
const EntityInfo = styled.div`
-
 
18
  align-items: center;
-
 
19
  display: flex;
-
 
20
  flex-direction: column;
-
 
21
`
-
 
22
 
-
 
23
const EntityStats = styled.ul`
-
 
24
  align-items: center;
-
 
25
  display: flex;
-
 
26
  gap: 0.5rem;
-
 
27
  position: absolute;
-
 
28
  right: 0.5rem;
-
 
29
  top: 0.5rem;
-
 
30
`
8
import StyledContainer from '../widgets/WidgetLayout'
31
 
9
 
32
const SearchItem = ({
10
const SearchItem = ({
33
  name,
11
  name,
34
  industry,
12
  industry,
Línea 44... Línea 22...
44
  company_size,
22
  company_size,
45
  view_common_connection
23
  view_common_connection
46
}) => {
24
}) => {
47
  return (
25
  return (
48
    <StyledContainer>
26
    <StyledContainer>
49
      <EntityHeader>
27
      <StyledContainer.Body>
-
 
28
        <Box display='flex' justifyContent='space-between'>
-
 
29
          <Box display='inline-flex' alignItems='center' gap={2}>
50
        <Avatar src={image} sx={{ width: '80px', height: '80px' }} />
30
            <Avatar src={image} sx={{ width: 60, height: 60 }} />
-
 
31
 
51
        <EntityInfo>
32
            <Box display='flex' flexDirection='column'>
52
          <Link to={url}>
33
              <Link to={url}>
53
            <h2>{title || name}</h2>
34
                <h2>{title || name}</h2>
54
          </Link>
35
              </Link>
55
          {company_name && <h4>{company_name}</h4>}
36
              {company_name && <h4>{company_name}</h4>}
56
          {company_size && <p>Empresa {company_size}</p>}
37
              {company_size && <p>Empresa {company_size}</p>}
57
          {industry && <p>{industry}</p>}
38
              {industry && <p>{industry}</p>}
58
        </EntityInfo>
39
            </Box>
59
      </EntityHeader>
40
          </Box>
60
 
41
 
61
      <EntityStats>
42
          <Box display='inline-flex' alignItems='center' gap={2}>
62
        {!company_name && !!common_connection && (
43
            {!company_name && view_common_connection && (
63
          <li>
-
 
64
            <p>
44
              <span>
65
              <Share />
45
                <Share />
66
              {view_common_connection && (
46
                {common_connection} comunes
67
                <small className='ml-2'>{common_connection} comunes</small>
-
 
68
              )}
-
 
69
            </p>
47
              </span>
70
          </li>
48
            )}
71
        )}
49
 
72
        {!!followers && (
50
            {followers ? (
73
          <li>
-
 
74
            <p>
51
              <span>
75
              <Group />
52
                <Group />
76
              <small className='ml-2'>{followers}</small>
53
                {followers}
77
            </p>
54
              </span>
78
          </li>
55
            ) : null}
79
        )}
56
 
80
        {!!views && (
57
            {views ? (
81
          <li>
-
 
82
            <p>
58
              <span>
83
              <Visibility />
59
                <Visibility />
84
              <small className='ml-2'>{views}</small>
60
                {views}
85
            </p>
61
              </span>
86
          </li>
62
            ) : null}
87
        )}
63
          </Box>
88
      </EntityStats>
64
        </Box>
-
 
65
 
89
      {description && parse(description)}
66
        {description && parse(description)}
-
 
67
 
90
      <TagsList tags={Object.values(skills)} />
68
        <TagsList tags={Object.values(skills)} />
-
 
69
      </StyledContainer.Body>
91
    </StyledContainer>
70
    </StyledContainer>
92
  )
71
  )
93
}
72
}
Línea 94... Línea 73...
94
 
73