PatInfoContainer.js 497 B

1234567891011121314151617181920212223
  1. import React from 'react';
  2. import {connect} from 'react-redux';
  3. import {initPersonInfo} from '../store/async-actions/patInfo';
  4. import PatInfo from '../components/PatInfo';
  5. function mapStateToProps({patInfo}) {
  6. return ({patInfo})
  7. }
  8. function mapDispatchToProps(dispatch) {
  9. return {
  10. getMessage: () => {
  11. dispatch(initPersonInfo)
  12. }
  13. }
  14. }
  15. const PatInfoComtainer = connect(
  16. mapStateToProps,
  17. mapDispatchToProps
  18. )(PatInfo);
  19. export default PatInfoComtainer;