import React from 'react';
import {connect} from 'react-redux';
import {initPersonInfo} from '../store/async-actions/patInfo';
import PatInfo from '../components/PatInfo';
import { SETINITPATINFO} from '../store/types/patInfo'

function mapStateToProps({patInfo}) {
    return ({patInfo})
}

function mapDispatchToProps(dispatch) {
    return {
        getMessage: () => {
            dispatch(initPersonInfo)
        },
        initPatInfoData: (params) =>{
            // console.log(params,11111)
            dispatch({
                type: SETINITPATINFO,
                params
            })
        }
    }
}

const PatInfoComtainer = connect(
    mapStateToProps,
    mapDispatchToProps
)(PatInfo);

export default PatInfoComtainer;