import React from 'react';
import { getImageUrl } from 'educoder';

function TeamItem({item,history}){
  return(
    <div onClick={()=>{history.push(`/${item.name}`)}} style={{cursor:"pointer"}}>
      <div className="imgBox"><img alt="" src={getImageUrl(`/${item.avatar_url}`)}/></div>
      <div style={{flex:'1'}}>
        <span className="mb5 font-18 color-grey-3 task-hide" style={{display:"block",maxWidth:"588px"}}>{item.nickname}</span>
        <div className="task-hide-2 teamdesc">
          {item.description}
        </div>
        <p className="item-news">
          <span>项目：{item.num_projects}</span>
          <span><i className="iconfont icon-shijian color-green mr3 font-12"></i>创建时间：{item.created_at}</span>
        </p>
      </div>
    </div>
  )
}
export default TeamItem;