import React, { Component } from "react"; import { withRouter, } from "react-router-dom"; import { Row } from 'react-bootstrap' class PortadaPage extends Component { constructor(props) { super(props); this.state = { } } componentDidMount() { } render() { const { arrDatos } = this.props.initState const { diseno } = arrDatos const { coverPage } = diseno return (
{ diseno.coverPage = 1 this.props.initsetState({ arrDatos }) }} className={ `portadaSidebar__CoverPage ${coverPage === 1 ? 'portadaSidebar__activeCoverPage' : null}` }> {'Imagen'} { diseno.coverPage = 2 this.props.initsetState({ arrDatos }) }} className={ `portadaSidebar__CoverPage ${coverPage === 2 ? 'portadaSidebar__activeCoverPage' : null}` }> {'Imagen'} { diseno.coverPage = 3 this.props.initsetState({ arrDatos }) }} className={ `portadaSidebar__CoverPage ${coverPage === 3 ? 'portadaSidebar__activeCoverPage' : null}` }> {'Imagen'}
); } initsetState(param) { this.props.initsetState(param) return true } }; export default withRouter(PortadaPage)