commonListTab.js 638 Bytes
/**
 * @Date:   2019-05-20T16:45:00+08:00
 * @Last modified time: 2019-06-26T18:40:44+08:00
 */

import { connect } from 'umi';
import CommonListTabComponent from '../../components/Common/CommonListTab';

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

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

  return (
    <CommonListTabComponent {...commonTabProps} />
  );
}

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