WayoutModal.js 2.64 KB
import React, { Component } from 'react'
import ReactModal from 'react-modal';


import * as SelectActionCreators from '../actions/profilationSelect'
import { connect } from 'react-redux';

import wayoutIcon from '../../img/wayOut.svg'



/*
<div className="Modal Modal-mask modal_repower Modal--save isOpen">
      <div className="Modal-wrapper">
      <div className="Modal-container" >
*/
class WayoutModal extends Component {
  render(){
    console.log('modalprops',this.props)
    return(
      <ReactModal
          isOpen={true}
          onRequestClose={() => this.props.hideModal()}
          portalClassName='modal modal-mask modal_repower quit-modal isOpen'
          overlayClassName='modal-wrapper'
          className='modal-container'
        >

          
        
          <div className="close_modal" onClick={() => this.props.hideModal()}><img src="https://d33wubrfki0l68.cloudfront.net/c0553300c767c895ee4900759828af6476c3e9e9/55953/img/closed_modal.svg" alt="" /></div>


         <div  className=" modal-header">
                    <img src={wayoutIcon} alt="" />

                    <h3> Sei sicuro di voler uscire e abbandonare l'attivazione?</h3>
            </div>

            <div className="modal-body">

                <p className="modal-description">Ricorda che il tuo processo è salvato e che potrai comunque riprendere l’attivazione in un qualsiasi momento con la funzione “riprendi attivazione”
inserendo il tuo indirizzo email e il codice attivazione.</p>

            <div className='modal-flex'>
                <a className='button-link' href='./index.html'><button className="btn__outline">
                   Abbandona attivazione
                </button></a>
                
                <a className='button-link'><button className="btn__red" onClick={() => this.props.hideModal()}>
                    Continua con l'attivazione
                </button></a>
            </div>
            </div>
        
      
        </ReactModal>
      )
  }
}

const mapStateToProps = state => {
  return {
  steps:state.ProfilationSelectReducer.steps,
  solutions:state.ProfilationSelectReducer.solutions,
  modalOpen:state.ProfilationSelectReducer.modalOpen
}};

const mapDispatchToProps = dispatch => ({
  updatePropValue: (prop,value,index,complete) => 
    dispatch(SelectActionCreators.changeValue(prop,value,index,complete)),
  updateStoreValue: (prop,value) => 
    dispatch(SelectActionCreators.changeProp(prop,value)),
    hideModal: () => 
    dispatch(SelectActionCreators.hideModal()),
});

export default connect(mapStateToProps, mapDispatchToProps)(WayoutModal);