import React from 'react';
import { connect } from 'umi';
import LoginSrmComponent from '../../../mobile/loginsrm/LoginSrm';

function LoginSrm({
  dispatch, app, content, loginMobile,
}) {
  const LoginProps = {
    app,
    content,
    onLogin: userlogin,
    dispatch,
    loginMobile,
  };

  function userlogin(param) {
    dispatch({
      type: 'login/login',
      payload: { ...param, dispatch },
    });
  }

  return (
    <div>
      <LoginSrmComponent {...LoginProps} />
    </div>
  );
}

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