import React from 'react';
import ListCount from '../Component/ListCount';
import { Link } from 'react-router-dom';
import { Tooltip } from 'antd';
function ListItem({item,key,OIdentifier}) {
  return(
    <div className="team_project" key={key}>
      <p className="t_p_title">
        <span className="flex1">
          <Link to={`/projects/${OIdentifier}/${item.identifier}`} className="name">{item.identifier}</Link>
          { item.forked_from_project_id && <i className="iconfont icon-fork font-18 color-orange ml8" /> }
          {
            item.type && item.type !== 0 ? 
            item.type === 2 ?
            <Tooltip title="该项目是一个镜像" className="ml8">
              <i className="iconfont icon-banbenku font-18 color-green" />
            </Tooltip>:
            <span className="ml8">
              <i className="iconfont icon-jingxiang font-18 color-green" />
            </span>:""
          }
        </span>
        <ListCount fork={item.forked_count} parise={item.praises_count}/>
      </p>
      <div className="desc">
      {item.description}
      </div>
      <div className="infos">
        <span className="font-12 color-grey-8">更新于{item.time_ago}</span>
      </div>
    </div>
  )
}
export default ListItem;