import React from 'react';
import { connect } from 'umi';
import FeedbackComponent from '../../components/Common/Feedback/Feedback';

function Feedback({
  dispatch, app, content,
}) {
  const feedbackProps = {
    app,
    content,
    dispatch,
    onAddPane: getAddPane, /* 增加标签 */
  };
  function getAddPane(pane) {
    /* 增加标签 */
    dispatch({ type: 'app/addPane', payload: { pane } });
  }
  return (
    <FeedbackComponent {...feedbackProps} style={{ height: '100%' }} />
  );
}

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