Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1910 Rev 1911
Línea 1... Línea 1...
1
import React, { useState, useEffect } from 'react'
1
import React, { useState } from 'react'
2
import { useSelector } from 'react-redux'
2
import { useSelector } from 'react-redux'
3
import { Box } from '@mui/material'
3
import { Box } from '@mui/material'
4
import BootstrapModal from 'react-bootstrap/Modal'
4
import BootstrapModal from 'react-bootstrap/Modal'
Línea 5... Línea 5...
5
 
5
 
Línea 24... Línea 24...
24
  animation = true,
24
  animation = true,
25
  showFooter = true,
25
  showFooter = true,
26
  dialogClassName,
26
  dialogClassName,
27
  children
27
  children
28
}) => {
28
}) => {
29
  const [loading, setLoading] = useState(true)
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 = () => {
32
  const handleAccept = () => {
Línea 36... Línea 36...
36
      onAccept()
36
      onAccept()
37
      return
37
      return
38
    }
38
    }
Línea 39... Línea 39...
39
 
39
 
40
    setLoading(true)
-
 
41
 
40
    setLoading(true)
42
    onAccept().finally(() => {
-
 
43
      console.log('on finally')
-
 
44
      setLoading(false)
-
 
45
    })
41
    onAccept().finally(() => setLoading(false))
Línea 46... Línea 42...
46
  }
42
  }
47
 
43
 
48
  return (
44
  return (