I am creating a functional component called EmptyZoo. const EmptyZoo = () => { /* Here i created onSubmit function function onSubmit(event) { event.preventDefault(); // calling the API by Axios. let response = () => { Axios.post("http://localhost:8081/zoo/save", { name: inputValues.name, address1: inputValues.address1, country: locations.country, }) }
// aquí he creado el retorno de parte modal ( // Aquí, cuando hago clic en el botón debajo del modal, se abre Agregar zoológico // Parte modal // Encabezado modal <Modal.Header closeButton> <Modal.Title>Encabezado modal</Modal.Title > </Modal.Header> // Cuerpo modal <Modal.Body> Nombre: <input type="text" name="name" id="user" className="form-control" required placeholder={t("Name ")} value={inputValues.name} onChange={handleChange} /> // País País: Seleccionar: País {ubicaciones.map((ubicación) => ( {ubicación.país} ))} </Modal.Body> // Elemento de pie de página <Modal.Footer> Cerrar Enviar </Modal.Footer> // este es mi final del código