Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1924 | Rev 1926 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1924 Rev 1925
Línea 27... Línea 27...
27
  children
27
  children
28
}) => {
28
}) => {
29
  const [loading, setLoading] = useState(false)
29
  const [loading, setLoading] = useState(false)
30
  const labels = useSelector(({ intl }) => intl.labels)
30
  const labels = useSelector(({ intl }) => intl.labels)
Línea 31... Línea 31...
31
 
31
 
32
  const handleAccept = useCallback(async () => {
32
  const handleAccept = useCallback(() => {
Línea 33... Línea 33...
33
    const enableLoading = isPromise(onAccept)
33
    const enableLoading = isPromise(onAccept)
34
 
34
 
35
    if (enableLoading) setLoading(true)
35
    if (enableLoading) setLoading(true)
36
    await onAccept()
36
    onAccept()
Línea 37... Línea 37...
37
    setLoading(false)
37
    setLoading(false)
38
  }, [onAccept])
38
  }, [onAccept])