Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 14359 Rev 15208
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import axios from 'axios'
2
import axios from 'axios'
3
import { Modal } from 'react-bootstrap'
3
import { Modal } from 'react-bootstrap'
4
import { useForm } from 'react-hook-form'
-
 
5
import { useDispatch } from 'react-redux'
4
import { useDispatch } from 'react-redux'
6
import { addNotification } from '../redux/notification/notification.actions'
5
import { addNotification } from '../redux/notification/notification.actions'
Línea 7... Línea 6...
7
 
6
 
8
const DeleteModal = ({
7
const DeleteModal = ({
Línea 13... Línea 12...
13
	onComplete,
12
	onComplete,
14
	url,
13
	url,
15
	message
14
	message
16
}) => {
15
}) => {
Línea 17... Línea -...
17
 
-
 
18
	const { handleSubmit } = useForm()
16
 
Línea 19... Línea 17...
19
	const dispatch = useDispatch()
17
	const dispatch = useDispatch()
20
 
18
 
21
	const onSubmit = () => {
19
	const onSubmit = () => {
Línea 56... Línea 54...
56
			})))
54
			})))
57
	}
55
	}
Línea 58... Línea 56...
58
 
56
 
59
	return (
57
	return (
60
		<Modal
58
		<Modal
61
			size="lg"
59
			size="md"
62
			show={isOpen}
60
			show={isOpen}
63
			onHide={closeModal}
61
			onHide={closeModal}
64
			autoFocus={false}
62
			autoFocus={false}
65
		>
-
 
66
			{/* <form onSubmit={handleSubmit(onSubmit)}> */}
63
		>
67
				<Modal.Body>
64
			<Modal.Body>
68
					<h3>{title}</h3>
65
				<h3>{title}</h3>
69
				</Modal.Body>
66
			</Modal.Body>
70
				<Modal.Footer>
67
			<Modal.Footer>
71
					<button
68
				<button
72
						className='btn btn-primary'
-
 
73
						// type="submit"
69
					className='btn btn-primary'
74
						onClick={onSubmit}
-
 
75
					>
70
					onClick={onSubmit}>
76
71
77
					</button>
72
				</button>
78
					<button
73
				<button
79
						className='btn btn-secondary'
74
					className='btn btn-secondary'
80
						onClick={closeModal}
-
 
81
					>
75
					onClick={closeModal}>
82
						No
76
					No
83
					</button>
77
				</button>
84
				</Modal.Footer>
-
 
85
			{/* </form> */}
78
			</Modal.Footer>
86
		</Modal >
79
		</Modal >
87
	)
80
	)
Línea 88... Línea 81...
88
}
81
}
89
 
82