Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 892 Rev 966
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import parse from 'html-react-parser'
-
 
3
import { styled } from 'styled-components'
-
 
4
import { Avatar } from '@mui/material'
-
 
5
import { Link } from 'react-router-dom'
2
import { Link } from 'react-router-dom'
6
import VisibilityIcon from '@mui/icons-material/Visibility'
3
import { Avatar } from '@mui/material'
7
import GroupIcon from '@mui/icons-material/Group'
4
import { Visibility, Group, Share } from '@mui/icons-material'
-
 
5
import styled from 'styled-components'
8
import ShareIcon from '@mui/icons-material/Share'
6
import parse from 'html-react-parser'
9
 
7
 
10
const StyledEntity = styled.article`
-
 
11
  background-color: var(--bg-color);
-
 
12
  border-radius: var(--border-radius);
8
import TagsList from '../UI/TagsList'
13
  box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.08);
9
import StyledContainer from '../widgets/WidgetLayout'
14
  display: flex;
-
 
15
  flex-direction: column;
-
 
16
  gap: 0.5rem;
-
 
17
  padding: 1rem;
-
 
18
  position: relative;
-
 
19
  width: 100%;
-
 
20
`
-
 
Línea 21... Línea 10...
21
 
10
 
22
const EntityHeader = styled.div`
11
const EntityHeader = styled.div`
23
  align-items: center;
12
  align-items: center;
24
  display: flex;
13
  display: flex;
Línea 54... Línea 43...
54
  followers,
43
  followers,
55
  company_size,
44
  company_size,
56
  view_common_connection
45
  view_common_connection
57
}) => {
46
}) => {
58
  return (
47
  return (
59
    <StyledEntity>
48
    <StyledContainer>
60
      <EntityHeader>
49
      <EntityHeader>
61
        <Avatar src={image} sx={{ width: '80px', height: '80px' }} />
50
        <Avatar src={image} sx={{ width: '80px', height: '80px' }} />
62
        <EntityInfo>
51
        <EntityInfo>
63
          <Link to={url}>
52
          <Link to={url}>
64
            <h3>{title || name}</h3>
53
            <h2>{title || name}</h2>
65
          </Link>
54
          </Link>
66
          {company_name && <h4>{company_name}</h4>}
55
          {company_name && <h4>{company_name}</h4>}
67
          {company_size && <p>Empresa {company_size} </p>}
56
          {company_size && <p>Empresa {company_size}</p>}
68
          {industry && <p>{industry}</p>}
57
          {industry && <p>{industry}</p>}
69
        </EntityInfo>
58
        </EntityInfo>
70
      </EntityHeader>
59
      </EntityHeader>
Línea 71... Línea 60...
71
 
60
 
72
      <EntityStats>
61
      <EntityStats>
73
        {!company_name && !!common_connection && (
62
        {!company_name && !!common_connection && (
74
          <li>
63
          <li>
75
            <p>
64
            <p>
76
              <ShareIcon />
65
              <Share />
77
              {view_common_connection && (
66
              {view_common_connection && (
78
                <small className='ml-2'>{common_connection} comunes</small>
67
                <small className='ml-2'>{common_connection} comunes</small>
79
              )}
68
              )}
80
            </p>
69
            </p>
81
          </li>
70
          </li>
82
        )}
71
        )}
83
        {!!followers && (
72
        {!!followers && (
84
          <li>
73
          <li>
85
            <p>
74
            <p>
86
              <GroupIcon />
75
              <Group />
87
              <small className='ml-2'>{followers}</small>
76
              <small className='ml-2'>{followers}</small>
88
            </p>
77
            </p>
89
          </li>
78
          </li>
90
        )}
79
        )}
91
        {!!views && (
80
        {!!views && (
92
          <li>
81
          <li>
93
            <p>
82
            <p>
94
              <VisibilityIcon />
83
              <Visibility />
95
              <small className='ml-2'>{views}</small>
84
              <small className='ml-2'>{views}</small>
96
            </p>
85
            </p>
97
          </li>
86
          </li>
98
        )}
87
        )}
99
      </EntityStats>
88
      </EntityStats>
100
      {description && parse(description)}
-
 
101
      {skills && (
-
 
102
        <ul className='skill-tags'>
89
      {description && parse(description)}
103
          {Object.values(skills).map((skill, id) => (
-
 
104
            <li key={id}>
-
 
105
              <button title={skill} className='btn btn-tertiary'>
-
 
106
                {skill}
-
 
107
              </button>
-
 
108
            </li>
-
 
109
          ))}
-
 
110
        </ul>
-
 
111
      )}
90
      <TagsList tags={Object.values(skills)} />
112
    </StyledEntity>
91
    </StyledContainer>
113
  )
92
  )
Línea 114... Línea 93...
114
}
93
}