import React , { Component } from 'react';
import { Link } from "react-router-dom";
import None from '../Images/emp.png'
class Nodata extends Component{
  render(){
    const { has_created_pull_requests , projectsId , owner , user_admin_or_developer , defaultBranch} = this.props;
    return(
      <div className="none_panels">
        <div>
          <div className="mb15">
            {/* <i className="iconfont icon-hebingqingqiu font-80 ver-middle color-grey-b"></i> */}
            <img src={None} alt=""/>
          </div>
          {
            !has_created_pull_requests && 
            <div>
              <p className="font-20">欢迎使用合并请求！</p>
              <div className="color-grey-8 mt10">
              合并请求可以帮助您与他人协作编写代码。请先创建一个合并请求
              </div>
              { user_admin_or_developer &&
                <div className="empBtn">
                  <span><Link className="operateButton" to={`/${owner}/${projectsId}/compare/${defaultBranch}...${defaultBranch}`}>去创建合并请求</Link></span>
                </div>
              }
            </div>
          }
        </div>
      </div>
    )
  }
}
export default Nodata;