Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5283 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5283 Rev 5284
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React, { useState } from 'react'
2
import React from 'react'
3
import parse from 'html-react-parser'
-
 
4
import Avatar from '../../../../shared/Avatar/Avatar'
-
 
5
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
-
 
6
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
-
 
7
import HelpersContainer from './HelpersContainer'
-
 
8
import SocialNetworks from '../../../components/home-section/SocialNetworks'
-
 
9
import StatItem from './StatItem'
-
 
10
import './Sidebar.scss'
3
import './Sidebar.scss'
Línea 11... Línea 4...
11
 
4
 
12
const Sidebar = ({
-
 
13
  image,
-
 
14
  fullName,
-
 
15
  description,
-
 
16
  visits,
-
 
17
  connections,
-
 
18
  cover = null
-
 
19
}) => {
-
 
20
  const [display, setDisplay] = useState(false)
-
 
21
 
5
const Sidebar = ({ children }) => {
22
  return (
6
  return (
23
    <div className='sidebar d-none d-md-flex'>
-
 
24
 
-
 
25
      <div className={`sidebar__top ${!cover && 'pt-3'}`}>
-
 
26
        {cover && <img src='./static/profile_2.jpg' alt='Profile cover' className='sidebar__cover' />}
-
 
27
        <Avatar imageUrl={image} size='xl' name={fullName} />
-
 
28
        <h2>{parse(fullName)}</h2>
-
 
29
        {parse(description)}
-
 
30
      </div>
-
 
31
 
-
 
32
      <div className={`sidebar__options ${display && 'show'}`}>
-
 
33
        <div className='sidebar__stats'>
-
 
34
          <StatItem title={`¿${LABELS.WHO_HAS_SEEN_MY_PROFILE}?`} number={visits} url='/profile/people-viewed-profile' />
-
 
35
          <StatItem title={LABELS.CONNECTIONS} number={connections} url='/connection/my-connections' />
-
 
36
        </div>
-
 
37
        <HelpersContainer />
-
 
38
        <SocialNetworks className='sidebar-apps__widget' />
-
 
39
      </div>
-
 
40
 
-
 
41
      <footer className='sideabar__footer'>
-
 
42
        <button onClick={() => setDisplay(!display)}>
7
    <div className='sidebar d-none d-md-flex'>
43
          <span>
-
 
44
            {display ? LABELS.VIEW_LESS : LABELS.VIEW_MORE}
-
 
45
          </span>
-
 
46
          {display ? <ExpandLessIcon /> : <ExpandMoreIcon />}
-
 
47
        </button>
-
 
48
      </footer>
-
 
49
 
8
      {children}
50
    </div>
9
    </div>
51
  )
10
  )
Línea 52... Línea 11...
52
}
11
}