Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3158 Rev 3719
Línea 1... Línea 1...
1
import { useContext } from 'react'
1
import { useContext } from 'react';
2
 
2
 
3
import { ValuesContext } from '@providers/habits/values'
3
import { ValuesContext } from '@providers/habits/values';
4
 
4
 
5
export function useValues() {
5
export function useValues() {
6
  const {
6
  const {
7
    loading,
7
    loading,
8
    values,
8
    values,
9
    addUrl: link_add,
9
    addUrl: link_add,
10
    total,
10
    total,
11
    addValue,
11
    addValue,
12
    removeValue,
12
    removeValue,
13
    updateValue,
13
    updateValue,
14
    getValueById
14
    getValueById
15
  } = useContext(ValuesContext)
15
  } = useContext(ValuesContext);
16
 
16
 
17
  return {
17
  return {
18
    loading,
18
    loading,
19
    values,
19
    values,
20
    addUrl: link_add,
20
    addUrl: link_add,
21
    total,
21
    total,
22
    addValue,
22
    addValue,
23
    removeValue,
23
    removeValue,
24
    updateValue,
24
    updateValue,
25
    getValueById
25
    getValueById
26
  }
26
  };
27
}
27
}