import React, { Component } from "react"; import { withRouter, } from "react-router-dom"; import { Row,Col,Container } from 'react-bootstrap' import axios from 'axios'; class CarretePage extends Component { constructor(props) { super(props); this.state = { indexItemImage: -1, } } componentDidMount() { } render() { const { arrDatos, } = this.props.initState const { arrCarousel } = arrDatos const { arrImages,checked } = arrCarousel return (
{ const check = this.props.initState.arrDatos.arrCarousel.checked = !checked; this.props.initsetState({ check }) } } />

Título

{ arrCarousel.title = event.target.value; this.initsetState({ arrDatos }) } } type={'text'} placeholder={ 'Ingresa un título' } value={ arrCarousel.title } /> { arrImages.map((t,e) => (
{ t.url === '' ? (

Agrega una imagen...

) : ( { arrImages[e].title = event.target.value; this.initsetState({ arrDatos }) } } /> ) }
{'Placeholder'}

Medida recomendada 1280x720px

{ t.url !== '' ? ( <> { arrImages[e].url_share = event.target.value; this.initsetState({ arrDatos }) } } />

Puedes redirigir a tu cliente al sitio que tu desees.

) : null }
)) }
); } onFileChange(index, file) { const { arrDatos, } = this.props.initState const { arrCarousel } = arrDatos const { arrImages } = arrCarousel const imgURL = URL.createObjectURL( file.target.files[0] ) arrImages[index].url = imgURL arrImages[index].files = file.target.files[0] this.initsetState({ arrDatos }); this.checkMarkValues(); } checkMarkValues() { const { arrDatos,arrCheck } = this.props.initState const { arrCarousel } = arrDatos if(arrCarousel.arrImages.length > 0) { arrCheck[6].checkMark = true; }else{ arrCheck[6].checkMark = false; } } removeImageFromCarrete(e) { const { arrDatos } = this.props.initState const { arrCarousel } = arrDatos const { arrImages } = arrCarousel arrImages.splice(e,1) this.initsetState({ arrDatos }) } onAddDiapo() { const { arrDatos, } = this.props.initState const { arrCarousel } = arrDatos const { arrImages } = arrCarousel arrImages.push({ url: '', title: '', }) this.initsetState({ arrDatos }) } initsetState(param) { this.props.initsetState(param) return true } }; export default withRouter(CarretePage)