Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev Autor Línea Nro. Línea
3146 stevensc 1
import { useContext } from 'react'
3112 stevensc 2
 
3146 stevensc 3
import { PurposesContext } from '@providers/habits/purposes'
4
 
5
export function useHabits() {
3114 stevensc 6
  const {
3146 stevensc 7
    loading,
8
    purposes,
9
    addUrl: link_add,
10
    total,
11
    addPurpose,
12
    deletePurpose,
13
    updatePurpose,
14
    getPurposeById
15
  } = useContext(PurposesContext)
3112 stevensc 16
 
3114 stevensc 17
  return {
18
    loading,
3146 stevensc 19
    purposes,
3114 stevensc 20
    addUrl: link_add,
21
    total,
3146 stevensc 22
    addPurpose,
23
    deletePurpose,
24
    updatePurpose,
25
    getPurposeById
3114 stevensc 26
  }
3112 stevensc 27
}