import React from 'react';
import { connect } from 'umi';
import CommonBillDeliverComponent from '../../components/Common/CommonBillDeliver';

function CommonBillDeliver({ dispatch, app, content }) {
  function removePane(changePanes, currentPane) {
    dispatch({ type: 'app/removePane', payload: { changePanes, currentPane } });
  }

  const commonBillDeliverProps = {
    app,
    content,
    dispatch,
    onRemovePane: removePane,
  };

  return (
    <CommonBillDeliverComponent {...commonBillDeliverProps} />
  );
}

export default connect(({ app, content }) =>
  ({ app, content }))(CommonBillDeliver);

