Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3481 Rev 3483
Línea 9... Línea 9...
9
export function useFetch(url) {
9
export function useFetch(url) {
10
  const { showError } = useAlert();
10
  const { showError } = useAlert();
Línea 11... Línea 11...
11
 
11
 
12
  const { data, loading, execute } = useApi(getResources(url), {
12
  const { data, loading, execute } = useApi(getResources(url), {
-
 
13
    autoFetch: true,
13
    autoFetch: true,
14
    onSuccess: (response) => console.log({ response }),
14
    onError: (err) => showError(err.message)
15
    onError: (error) => showError(error)
Línea 15... Línea 16...
15
  });
16
  });
16
 
17
 
17
  return {
18
  return {