import React from 'react';
import { connect } from 'umi';
import CommonList from '../../routes/commonList/commonList'; /* 公共列表 */
import CommonClassify from '../commonClassify/commonClassify'; /* 公共分类 */

function PpopupPane({ app }) {
  const pane = app.ppopupPane;
  let content = '';
  if (pane !== undefined && Object.keys(pane).length > 0) {
    if (pane.route === '/commonList') {
      content = <CommonList />;
    } else if (pane.route === '/commonClassify') {
      content = <CommonClassify />;
    }
  }

  return (
    <div >
      {content}
    </div>
  );
}

export default connect(({ app }) => ({ app }))(PpopupPane);
