import React from 'react';
import { connect } from 'umi';
import MyselfMobileComponent from '../../../mobile/common/MyselfMobile';

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

  const myselfMobileProps = {
    app,
    content,
    dispatch,
    sModelType,
    sModelsId,
    formRoute: '/myself',
    onRemovePane: removePane,
  };
  return (
    <MyselfMobileComponent {...myselfMobileProps} />
  );
}

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