Jack Mallers
7 years ago
6 changed files with 156 additions and 30 deletions
@ -0,0 +1,22 @@ |
|||
import React from 'react' |
|||
import PropTypes from 'prop-types' |
|||
import styles from './PeersList.scss' |
|||
|
|||
const PeersList = ({ peers }) => ( |
|||
<ul> |
|||
{ |
|||
peers.map(peer => |
|||
<li className={styles.peer} key={peer.peer_id}> |
|||
<h1>{peer.address}</h1> |
|||
<h4>{peer.pub_key}</h4> |
|||
</li> |
|||
) |
|||
} |
|||
</ul> |
|||
) |
|||
|
|||
PeersList.propTypes = { |
|||
peers: PropTypes.array.isRequired |
|||
} |
|||
|
|||
export default PeersList |
@ -0,0 +1,18 @@ |
|||
@import '../../variables.scss'; |
|||
|
|||
.peer { |
|||
margin: 20px 0; |
|||
cursor: pointer; |
|||
|
|||
&:hover { |
|||
opacity: 0.5; |
|||
} |
|||
|
|||
h1 { |
|||
margin-bottom: 5px; |
|||
} |
|||
|
|||
h4 { |
|||
font-size: 10px; |
|||
} |
|||
} |
Loading…
Reference in new issue