Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3485 Rev 3486
Línea 7... Línea 7...
7
};
7
};
Línea 8... Línea 8...
8
 
8
 
9
export function useFetch(url) {
9
export function useFetch(url) {
Línea 10... Línea 10...
10
  const { showError } = useAlert();
10
  const { showError } = useAlert();
11
 
11
 
-
 
12
  const { data, loading, execute } = useApi(getResources, {
-
 
13
    autoFetch: true,
12
  const { data, loading, execute } = useApi(getResources(url), {
14
    autofetchDependencies: [url],
13
    autoFetch: true,
15
    initialArgs: [url],
14
    onSuccess: (response) => console.log({ response }),
16
    onSuccess: (response) => console.log({ response }),
Línea 15... Línea 17...
15
    onError: (error) => showError(error)
17
    onError: (error) => showError(error)