Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 9838 Rev 9839
Línea 5... Línea 5...
5
import SearchLocationInput from '../../../shared/SearchLocationInput'
5
import SearchLocationInput from '../../../shared/SearchLocationInput'
6
import DescriptionInput from '../../../shared/DescriptionInput'
6
import DescriptionInput from '../../../shared/DescriptionInput'
7
import { useHistory, useParams } from 'react-router-dom'
7
import { useHistory, useParams } from 'react-router-dom'
8
import "react-datetime/css/react-datetime.css"
8
import "react-datetime/css/react-datetime.css"
9
import { validate } from 'uuid'
9
import { validate } from 'uuid'
-
 
10
import { addNotification } from '../../../redux/notification/notification.actions'
-
 
11
import { useDispatch } from 'react-redux'
Línea 10... Línea 12...
10
 
12
 
Línea 11... Línea 13...
11
const FormView = ({ actionLink, googleApiKey }) => {
13
const FormView = ({ actionLink, googleApiKey }) => {
12
 
14
 
-
 
15
  const history = useHistory()
-
 
16
  const { action } = useParams()
Línea 13... Línea 17...
13
  const history = useHistory()
17
  const dispatch = useDispatch()
Línea 14... Línea 18...
14
  let { action } = useParams()
18
 
15
 
19
 
Línea 72... Línea 76...
72
        }
76
        }
73
        dispatch(addNotification({
77
        dispatch(addNotification({
74
          style: "success",
78
          style: "success",
75
          msg: `Registro ${action === "edit" ? "actualizado" : "guardado"}`
79
          msg: `Registro ${action === "edit" ? "actualizado" : "guardado"}`
76
        }))
80
        }))
77
        closeModal()
-
 
78
      })
81
      })
79
      .catch((err) => setError(err))
82
      .catch((err) => dispatch(addNotification({
-
 
83
        style: "error",
-
 
84
        msg: "Ha ocurrido un error"
-
 
85
      })))
Línea 80... Línea 86...
80
 
86
 
Línea 81... Línea 87...
81
  }
87
  }