Proyectos de Subversion LeadersLinked - SPA

Rev

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

import { useContext } from 'react'

import { GoalsContext } from '@providers/habits/goals'

export function useGoals() {
  const {
    loading,
    goals,
    addUrl: link_add,
    total,
    addGoal,
    deleteGoal,
    updateGoal,
    getGoalById
  } = useContext(GoalsContext)

  return {
    loading,
    goals,
    addUrl: link_add,
    total,
    addGoal,
    deleteGoal,
    updateGoal,
    getGoalById
  }
}