Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11483 Rev 11484
Línea 3... Línea 3...
3
import axios from 'axios'
3
import axios from 'axios'
4
import { useForm } from 'react-hook-form'
4
import { useForm } from 'react-hook-form'
5
import { useDispatch } from 'react-redux'
5
import { useDispatch } from 'react-redux'
6
import { addNotification } from '../../../redux/notification/notification.actions'
6
import { addNotification } from '../../../redux/notification/notification.actions'
Línea 7... Línea 7...
7
 
7
 
Línea 8... Línea 8...
8
const EditAndAddModal = ({ action_link, closeModal, type }) => {
8
const EditAndAddModal = ({ action_link, closeModal, type, onComplete }) => {
9
 
9
 
10
	//Hooks
10
	//Hooks
11
	const { register, handleSubmit, errors, setValue, clearErrors } = useForm()
11
	const { register, handleSubmit, errors, setValue, clearErrors } = useForm()
Línea 31... Línea 31...
31
					}))
31
					}))
32
				}
32
				}
Línea 33... Línea 33...
33
 
33
 
34
				clearErrors()
34
				clearErrors()
-
 
35
				closeModal()
35
				closeModal()
36
				onComplete()
36
				dispatch(addNotification({
37
				dispatch(addNotification({
37
					style: 'success',
38
					style: 'success',
38
					msg: 'Usuario registrado'
39
					msg: 'Usuario registrado'
39
				}))
40
				}))