Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 5 Rev 3287
Línea 5... Línea 5...
5
import { useSelector } from 'react-redux'
5
import { useSelector } from 'react-redux'
6
import IconButton from '@mui/material/IconButton'
6
import IconButton from '@mui/material/IconButton'
7
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
7
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
8
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
8
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
Línea 9... Línea -...
9
 
-
 
10
import Avatar from '../../UI/AvatarImage'
9
 
-
 
10
import EmptySection from '../../UI/EmptySection'
Línea 11... Línea 11...
11
import EmptySection from '../../UI/EmptySection'
11
import Avatar from '@components/common/Avatar'
12
 
12
 
13
const GroupWidget = styled.div`
13
const GroupWidget = styled.div`
14
  display: flex;
14
  display: flex;
Línea 58... Línea 58...
58
`
58
`
Línea 59... Línea 59...
59
 
59
 
60
const GroupsInfo = ({
60
const GroupsInfo = ({
61
  url = '/helpers/my-groups',
61
  url = '/helpers/my-groups',
62
  title = 'Mis grupos',
62
  title = 'Mis grupos',
63
  display = false,
63
  display = false
64
}) => {
64
}) => {
65
  const [widgetData, setWidgetData] = useState([])
65
  const [widgetData, setWidgetData] = useState([])
66
  const [displayMenu, setDisplayMenu] = useState(display)
66
  const [displayMenu, setDisplayMenu] = useState(display)
67
  const [lookMore, setLookMore] = useState(false)
67
  const [lookMore, setLookMore] = useState(false)
Línea 104... Línea 104...
104
      {widgetData.length ? (
104
      {widgetData.length ? (
105
        <WidgetList show={displayMenu}>
105
        <WidgetList show={displayMenu}>
106
          {dataSlice().map(({ id, name, profile, image }) => (
106
          {dataSlice().map(({ id, name, profile, image }) => (
107
            <ListItem key={id}>
107
            <ListItem key={id}>
108
              <Link to={profile}>
108
              <Link to={profile}>
109
                <Avatar imageUrl={image} size="md" name={name} />
109
                <Avatar imageUrl={image} size='md' name={name} />
110
                <span>{name}</span>
110
                <span>{name}</span>
111
              </Link>
111
              </Link>
112
            </ListItem>
112
            </ListItem>
113
          ))}
113
          ))}
114
        </WidgetList>
114
        </WidgetList>
Línea 116... Línea 116...
116
        <EmptySection message={labels.empty} />
116
        <EmptySection message={labels.empty} />
117
      )}
117
      )}
Línea 118... Línea 118...
118
 
118
 
119
      {widgetData.length >= 3 && (
119
      {widgetData.length >= 3 && (
120
        <ListItem
120
        <ListItem
121
          as="button"
121
          as='button'
122
          className="justify-content-center cursor-pointer py-2"
122
          className='justify-content-center cursor-pointer py-2'
123
          onClick={() => setLookMore(!lookMore)}
123
          onClick={() => setLookMore(!lookMore)}
124
        >
124
        >
125
          <span>{lookMore ? labels.view_less : labels.view_more}</span>
125
          <span>{lookMore ? labels.view_less : labels.view_more}</span>
126
        </ListItem>
126
        </ListItem>