import React , { Component } from 'react';
import { Menu , Input , Dropdown , Icon, Result } from 'antd';
import { Link } from 'react-router-dom';
import '../css/index.css'
import './list.css';
class IndexItem extends Component{
renderList=(list)=>{
if(list && list.length >0 ){
list.map((item,key)=>{
return(
{item.name}
{item.forked_count}
10
{ item.language && item.language.id && }
{item.visits}
{ item.category && item.category.id && {item.category.name}}
最后更新于9小时前
)
})
}
}
render(){
const { projects } = this.props;
const renderList = (
projects && projects.length >0 && projects.map((item,key)=>{
return(
{item.name}
{ item.forked_count ? { item.forked_count}:"" }
{ item.prasies_count ? { item.prasies_count }:"" }
{ item.language && item.language.id ? :"" }
{item.visits}
{ item.category && item.category.id && {item.category.name}}
最后更新于9小时前
)
})
)
console.log(renderList);
return(
{ renderList }
)
}
}
export default IndexItem;