import { connect } from 'umi';
import PersonCenterComponent from '@/components/Common/PersonCenter/PersonCenter';

function personCenter({ dispatch, menuPanel, app }) {
  const personCenterProps = {
    dispatch,
    app,
    menuPanel,
    onAddPane: getAddPane, /* 增加标签 */
  };

  function getAddPane(pane) {
    /* 增加标签 */
    dispatch({ type: 'app/addPane', payload: { pane } });
  }

  return (
    <PersonCenterComponent {...personCenterProps} />
  );
}

export default connect(({ menuPanel, app }) => ({ menuPanel, app }))(personCenter);
