Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2280 Rev 2614
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { useHistory } from 'react-router-dom'
2
import { useNavigate } from 'react-router-dom'
3
import { useSelector } from 'react-redux'
3
import { useSelector } from 'react-redux'
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea 5...
5
import useFetch from '@app/hooks/useFetch'
5
import useFetch from '@app/hooks/useFetch'
Línea 9... Línea 9...
9
import EmptySection from '@app/components/UI/EmptySection'
9
import EmptySection from '@app/components/UI/EmptySection'
Línea 10... Línea 10...
10
 
10
 
11
export default function HomeNews({ currentPost }) {
11
export default function HomeNews({ currentPost }) {
12
  const { data: news } = useFetch('/helpers/posts', [])
12
  const { data: news } = useFetch('/helpers/posts', [])
13
  const labels = useSelector(({ intl }) => intl.labels)
13
  const labels = useSelector(({ intl }) => intl.labels)
Línea 14... Línea 14...
14
  const history = useHistory()
14
  const navigate = useNavigate()
15
 
15
 
16
  return (
16
  return (
Línea 31... Línea 31...
31
                key={title}
31
                key={title}
32
                title={title}
32
                title={title}
33
                image={image}
33
                image={image}
34
                subheader={date}
34
                subheader={date}
35
                avatarVariant='square'
35
                avatarVariant='square'
36
                onClick={() => history.replace(link)}
36
                onClick={() => navigate(link)}
37
              />
37
              />
38
            )
38
            )
39
          })}
39
          })}
40
        </List>
40
        </List>
41
      </Widget.Body>
41
      </Widget.Body>