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

Título

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

Medida recomendada 1280x720px

{ arrOpiniones[e].autor = event.target.value; this.initsetState({ arrDatos }) } } value={ arrOpiniones[e].autor } /> { arrOpiniones[e].trabajo = event.target.value; this.initsetState({arrDatos}) } } value={ arrOpiniones[e].trabajo } /> this.removeImageFromCarrete(e) }>Remover Diapositiva
)) }
); } onFileChange(index, file) { const { arrDatos, } = this.props.initState const { arrCarouselOp } = arrDatos const { arrOpiniones } = arrCarouselOp const imgURL = URL.createObjectURL( file.target.files[0] ) arrOpiniones[index].img = imgURL arrOpiniones[index].files = file.target.files[0] this.initsetState({ arrDatos }); this.checkMarkValues(); } checkMarkValues(){ const { arrDatos,arrCheck } = this.props.initState const { arrCarouselOp } = arrDatos if(arrCarouselOp.arrOpiniones.length > 0){ arrCheck[7].checkMark = true; }else{ arrCheck[7].checkMark = false; } } onAddDiapo() { const { arrDatos, } = this.props.initState const { arrCarouselOp } = arrDatos const { arrOpiniones } = arrCarouselOp arrOpiniones.push({ img: 'img/icons/profile2.png', val: '', autor: '', trabajo: '' }) this.initsetState({ arrDatos }) } removeImageFromCarrete(e){ const { arrDatos } = this.props.initState const { arrCarouselOp } = arrDatos const { arrOpiniones } = arrCarouselOp arrOpiniones.splice(e,1) this.initsetState({ arrDatos }) } initsetState(param) { this.props.initsetState(param) return true } }; export default withRouter(OpinionesPage)