el.xwx.moe/src/componets/List.js

28 lines
584 B
JavaScript
Raw Normal View History

2022-04-16 12:50:42 -05:00
const List = ({data}) => {
console.log(data)
return (
<table className="table">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Title</th>
<th>Link</th>
</tr>
</thead>
<tbody>
{data.map((e, i) => {
return <tr key={i}>
<td>{i + 1}</td>
<td>{e.login}</td>
<td>{e.node_id}</td>
<td>{e.html_url}</td>
</tr>
})}
</tbody>
</table>
)
}
export default List