Created
March 3, 2019 18:48
-
-
Save agoiabel/f630bbdd1f95434389550ebf515f51a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let users; | |
if (this.state.users !== null) { | |
users = this.state.users.map(user => ( | |
<tr key={user.id}> | |
<td>{user.id}</td> | |
<td>{user.first_name}</td> | |
<td>{user.last_name}</td> | |
</tr> | |
)); | |
} | |
return ( | |
<div className={styles.app}> | |
<table className={styles.table}> | |
<thead> | |
<tr> | |
<th>S/N</th> | |
<th>First Name</th> | |
<th>Last Name</th> | |
</tr> | |
</thead> | |
<tbody> | |
{ users } | |
</tbody> | |
</table> | |
<div className={styles.pagination}> | |
<span>«</span> | |
<span className={styles.active}>1</span> | |
<span>2</span> | |
<span>3</span> | |
<span>4</span> | |
<span>»</span> | |
</div> | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment