Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 517 Rev 851
Línea 10... Línea 10...
10
 
10
 
11
const Groups = () => {
11
const Groups = () => {
Línea 12... Línea 12...
12
  const labels = useSelector(({ intl }) => intl.labels)
12
  const labels = useSelector(({ intl }) => intl.labels)
13
 
13
 
14
  return (
14
  return (
15
    <div className="sidebar__bottom">
15
    <div className='sidebar__bottom'>
16
      <Groups.Item
16
      <Groups.Item
17
        url="/helpers/my-groups"
17
        url='/helpers/my-groups'
18
        title={labels.my_groups}
18
        title={labels.my_groups}
19
        display={true}
19
        display={true}
20
      />
20
      />
21
      <Groups.Item
21
      <Groups.Item
22
        url="/helpers/groups-suggestion"
22
        url='/helpers/groups-suggestion'
23
        title={labels.suggest_groups}
23
        title={labels.suggest_groups}
24
      />
24
      />
25
    </div>
25
    </div>
Línea 26... Línea 26...
26
  )
26
  )
27
}
27
}
28
 
28
 
29
const Item = ({
29
const Item = ({
30
  url = '/helpers/my-groups',
30
  url = '/helpers/my-groups',
31
  title = 'Mis grupos',
31
  title = 'Mis grupos',
32
  display = false,
32
  display = false
33
}) => {
33
}) => {
34
  const [widgetData, setWidgetData] = useState([])
34
  const [widgetData, setWidgetData] = useState([])
Línea 61... Línea 61...
61
  useEffect(() => {
61
  useEffect(() => {
62
    getData()
62
    getData()
63
  }, [])
63
  }, [])
Línea 64... Línea 64...
64
 
64
 
65
  return (
65
  return (
66
    <div className="sidebar__recent-item__container">
66
    <div className='sidebar__recent-item__container'>
67
      <section className="sidebar__recent-item">
67
      <section className='sidebar__recent-item'>
68
        <p>{title}</p>
68
        <p>{title}</p>
69
        <button className="sidebar__recent-icon" onClick={toggleMenu}>
69
        <button className='sidebar__recent-icon' onClick={toggleMenu}>
70
          {displayMenu ? <ExpandLessIcon /> : <ExpandMoreIcon />}
70
          {displayMenu ? <ExpandLessIcon /> : <ExpandMoreIcon />}
71
        </button>
71
        </button>
Línea 72... Línea 72...
72
      </section>
72
      </section>
73
 
73
 
74
      <ul className={`helper__list ${displayMenu ? 'show' : 'hide'}`}>
74
      <ul className={`helper__list ${displayMenu ? 'show' : 'hide'}`}>
75
        {widgetData.length ? (
75
        {widgetData.length ? (
76
          dataSlice().map(({ id, name, profile, image }) => (
76
          dataSlice().map(({ id, name, profile, image }) => (
77
            <li key={id}>
77
            <li key={id}>
78
              <Link
78
              <Link
79
                to={profile}
79
                to={profile}
80
                className="helper__list-item"
80
                className='helper__list-item'
81
                target="secondary"
81
                target='secondary'
82
              >
82
              >
83
                <Avatar
83
                <Avatar
84
                  src={image}
84
                  src={image}
Línea 93... Línea 93...
93
          <EmptySection message={labels.datatable_empty} />
93
          <EmptySection message={labels.datatable_empty} />
94
        )}
94
        )}
Línea 95... Línea 95...
95
 
95
 
96
        {widgetData.length >= 3 && (
96
        {widgetData.length >= 3 && (
97
          <li
97
          <li
98
            className="helper__list-item justify-content-center cursor-pointer py-2"
98
            className='helper__list-item justify-content-center cursor-pointer py-2'
99
            onClick={() => setLookMore(!lookMore)}
99
            onClick={() => setLookMore(!lookMore)}
100
          >
100
          >
101
            <span>{lookMore ? labels.view_less : labels.view_more}</span>
101
            <span>{lookMore ? labels.view_less : labels.view_more}</span>
102
          </li>
102
          </li>