import React from "react";
import { connect } from "react-redux";
import PrintPreview from "../components/PrintPreview";
import {saveMessage} from '../store/async-actions/print'
import {saveClickNum} from '@store/async-actions/homePage';

function mapStateToProps(state) {
  return {
    preInfo : state.patInfo.message
  }
}

function mapDispatchToProps(dispatch) {
  return {
    save: (bool) => {
        dispatch(saveClickNum);
        dispatch(() => saveMessage(bool))
    },
  };
}

const PrintPreviewContainer = connect(
  mapStateToProps,
  mapDispatchToProps
)(PrintPreview);

export default PrintPreviewContainer;

