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
No known key found for this signature in database
GPG Key ID: 6EE5F3785F78B345
2 changed files with
8 additions and
4 deletions
-
app/components/Peers/Peer.js
-
app/routes/peers/components/Peers.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 |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -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 |
|
|
|