Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3209 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

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