Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7302 Rev 7303
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { Modal } from 'react-bootstrap'
2
import { Modal } from 'react-bootstrap'
3
import parse from 'html-react-parser'
3
import parse from 'html-react-parser'
4
import { axios } from '../../utils'
4
import { axios } from '../../utils'
-
 
5
import { addNotification } from '../../redux/notification/notification.actions'
-
 
6
import { useDispatch } from 'react-redux'
Línea 5... Línea 7...
5
 
7
 
-
 
8
const EventModal = ({ event, show, onClose }) => {
-
 
9
  const dispatch = useDispatch()
6
const EventModal = ({ event, show, onClose }) => {
10
 
7
  const getBackendVarUrl = () => {
11
  const getBackendVarUrl = () => {
8
    axios.get(event?.url).then((response) => {
12
    axios.get(event?.url).then((response) => {
-
 
13
      const { data, success } = response.data
-
 
14
 
-
 
15
      if (!success) {
-
 
16
        dispatch(
-
 
17
          addNotification({
-
 
18
            style: 'danger',
-
 
19
            msg: 'Error interno. Por favor, intente más tarde.',
-
 
20
          })
-
 
21
        )
-
 
22
        return
-
 
23
      }
-
 
24
 
9
      console.log(response)
25
      window.open(data, '_blank')
10
    })
26
    })
Línea 11... Línea 27...
11
  }
27
  }
12
 
28