Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3114 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import { useContext, useEffect } from 'react'
import { HabitsContext } from '@app/providers/habits'
import { useFetch } from '../useFetch'

export function useHabits({ url }) {
  const { data: values, isLoading: loading } = useFetch(url)
  const habitsState = useContext(HabitsContext)

  useEffect(() => {
    console.log(values)
  }, [values])

  return { ...habitsState, loading }
}