Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3025 Rev 3026
Línea 14... Línea 14...
14
  ListItemAvatar,
14
  ListItemAvatar,
15
  ListItemButton,
15
  ListItemButton,
16
  ListItemText
16
  ListItemText
17
} from '@mui/material'
17
} from '@mui/material'
18
import Spinner from '@components/UI/Spinner'
18
import Spinner from '@components/UI/Spinner'
-
 
19
import colors from '@styles/colors'
Línea 19... Línea 20...
19
 
20
 
20
const SuggestWidget = ({ title, url }) => {
21
const SuggestWidget = ({ title, url }) => {
21
  const { data, isLoading } = useFetch(url, [])
22
  const { data, isLoading } = useFetch(url, [])
22
  const [lookMore, setLookMore] = useState(false)
23
  const [lookMore, setLookMore] = useState(false)
Línea 39... Línea 40...
39
              {lookMore ? labels.view_less : labels.view_more}
40
              {lookMore ? labels.view_less : labels.view_more}
40
            </Button>
41
            </Button>
41
          )
42
          )
42
        }}
43
        }}
43
      />
44
      />
44
      <Widget.Body>
45
      <Widget.Body styles={data.length > 0 && { padding: 0 }}>
45
        {isLoading && <Spinner />}
46
        {isLoading && <Spinner />}
Línea 46... Línea 47...
46
 
47
 
47
        {!isLoading && data.length === 0 ? (
48
        {!isLoading && data.length === 0 ? (
48
          <EmptySection message={labels?.datatable_empty} />
49
          <EmptySection message={labels?.datatable_empty} />
49
        ) : (
50
        ) : (
50
          <List>
51
          <List>
-
 
52
            {items.map(({ name, profile, image, id }) => (
51
            {items.map(({ name, profile, image, id }) => (
53
              <ListItem
-
 
54
                key={id}
-
 
55
                sx={{ borderTop: `1px solid ${colors.border.primary}` }}
52
              <ListItem key={id}>
56
              >
53
                <ListItemButton LinkComponent={Link} to={profile} disableRipple>
57
                <ListItemButton LinkComponent={Link} to={profile} disableRipple>
54
                  <ListItemAvatar>
58
                  <ListItemAvatar>
55
                    <Avatar src={image} alt={`${name} profile avatar`} />
59
                    <Avatar src={image} alt={`${name} profile avatar`} />