Browse Source

fix(prop-types): Improve propTypes for Peer and Peers through use of shape

renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
640c1744ec
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 5
      app/components/Peers/Peer.js
  2. 7
      app/routes/peers/components/Peers.js

5
app/components/Peers/Peer.js

@ -10,7 +10,10 @@ const Peer = ({ peer, setPeer }) => (
)
Peer.propTypes = {
peer: PropTypes.object.isRequired,
peer: PropTypes.shape({
address: PropTypes.string.isRequired,
pub_key: PropTypes.string.isRequired
}).isRequired,
setPeer: PropTypes.func.isRequired
}

7
app/routes/peers/components/Peers.js

@ -128,9 +128,10 @@ Peers.propTypes = {
peerModalOpen: PropTypes.bool.isRequired,
filteredPeers: PropTypes.array.isRequired,
peers: PropTypes.object.isRequired,
peer: PropTypes.object,
searchQuery: PropTypes.string
peers: PropTypes.shape({
peer: PropTypes.object,
searchQuery: PropTypes.string
}).isRequired
}
export default Peers

Loading…
Cancel
Save