Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2772 Rev 2774
Línea 3... Línea 3...
3
 
3
 
4
import { axios } from '@app/utils'
4
import { axios } from '@app/utils'
5
import { addNotification } from '@app/redux/notification/notification.actions'
5
import { addNotification } from '@app/redux/notification/notification.actions'
Línea 6... Línea 6...
6
import { logout } from '@app/redux/auth/auth.actions'
6
import { logout } from '@app/redux/auth/auth.actions'
7
 
7
 
8
const useFetch = (url, defaultValue = {}) => {
8
export function useFetch(url, defaultValue = {}) {
9
  const [data, setData] = useState(defaultValue)
9
  const [data, setData] = useState(defaultValue)
Línea 10... Línea 10...
10
  const [isLoading, setIsLoading] = useState(true)
10
  const [isLoading, setIsLoading] = useState(true)
Línea 60... Línea 60...
60
    mutate,
60
    mutate,
61
    isLoading,
61
    isLoading,
62
    refetch
62
    refetch
63
  }
63
  }
64
}
64
}
65
 
-
 
66
export default useFetch
-