Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3209 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3719 stevensc 1
import { useContext } from 'react';
2
 
3
import { GoalsContext } from '@providers/habits/goals';
4
 
5
export function useGoals() {
6
  const {
7
    loading,
8
    goals,
9
    addUrl: link_add,
10
    total,
11
    addGoal,
12
    deleteGoal,
13
    updateGoal,
14
    getGoalById
15
  } = useContext(GoalsContext);
16
 
17
  return {
18
    loading,
19
    goals,
20
    addUrl: link_add,
21
    total,
22
    addGoal,
23
    deleteGoal,
24
    updateGoal,
25
    getGoalById
26
  };
27
}