Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 851 Rev 853
Línea 1... Línea 1...
1
import React, { useEffect, useState } from 'react'
1
import React, { useEffect, useState } from 'react'
2
import { axios } from '../../../utils'
2
import { axios } from '../../../utils'
3
import { Link } from 'react-router-dom'
3
import { Link } from 'react-router-dom'
4
import { Avatar } from '@mui/material'
4
import { Avatar, IconButton } from '@mui/material'
5
import { useSelector } from 'react-redux'
5
import { useSelector } from 'react-redux'
6
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
6
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
7
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
7
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
-
 
8
import styled from 'styled-components'
Línea 8... Línea 9...
8
 
9
 
-
 
10
import EmptySection from '../../UI/EmptySection'
-
 
11
import StyledContainer from '../../widgets/WidgetLayout'
-
 
12
 
-
 
13
const GroupsHelperContainer = styled(StyledContainer)`
-
 
14
  padding: 10px;
-
 
15
`
-
 
16
 
-
 
17
const StyledGroupItem = styled.div`
-
 
18
  cursor: pointer;
-
 
19
  display: flex;
-
 
20
  align-items: center;
-
 
21
  justify-content: space-between;
-
 
22
  width: 100%;
Línea 9... Línea 23...
9
import EmptySection from '../../UI/EmptySection'
23
`
10
 
24
 
Línea 11... Línea 25...
11
const Groups = () => {
25
const Groups = () => {
12
  const labels = useSelector(({ intl }) => intl.labels)
26
  const labels = useSelector(({ intl }) => intl.labels)
13
 
27
 
14
  return (
28
  return (
15
    <div className='sidebar__bottom'>
29
    <GroupsHelperContainer>
16
      <Groups.Item
30
      <Groups.Item
17
        url='/helpers/my-groups'
31
        url='/helpers/my-groups'
18
        title={labels.my_groups}
32
        title={labels.my_groups}
19
        display={true}
33
        display={true}
20
      />
34
      />
21
      <Groups.Item
35
      <Groups.Item
22
        url='/helpers/groups-suggestion'
36
        url='/helpers/groups-suggestion'
23
        title={labels.suggest_groups}
37
        title={labels.suggest_groups}
24
      />
38
      />
Línea 25... Línea 39...
25
    </div>
39
    </GroupsHelperContainer>
26
  )
40
  )
Línea 61... Línea 75...
61
  useEffect(() => {
75
  useEffect(() => {
62
    getData()
76
    getData()
63
  }, [])
77
  }, [])
Línea 64... Línea 78...
64
 
78
 
65
  return (
79
  return (
66
    <div className='sidebar__recent-item__container'>
80
    <>
67
      <section className='sidebar__recent-item'>
81
      <StyledGroupItem>
68
        <p>{title}</p>
82
        <span>{title}</span>
69
        <button className='sidebar__recent-icon' onClick={toggleMenu}>
83
        <IconButton onClick={toggleMenu}>
70
          {displayMenu ? <ExpandLessIcon /> : <ExpandMoreIcon />}
84
          {displayMenu ? <ExpandLessIcon /> : <ExpandMoreIcon />}
71
        </button>
85
        </IconButton>
Línea 72... Línea 86...
72
      </section>
86
      </StyledGroupItem>
73
 
87
 
74
      <ul className={`helper__list ${displayMenu ? 'show' : 'hide'}`}>
88
      <ul className={`helper__list ${displayMenu ? 'show' : 'hide'}`}>
75
        {widgetData.length ? (
89
        {widgetData.length ? (
Línea 100... Línea 114...
100
          >
114
          >
101
            <span>{lookMore ? labels.view_less : labels.view_more}</span>
115
            <span>{lookMore ? labels.view_less : labels.view_more}</span>
102
          </li>
116
          </li>
103
        )}
117
        )}
104
      </ul>
118
      </ul>
105
    </div>
119
    </>
106
  )
120
  )
107
}
121
}
Línea 108... Línea 122...
108
 
122