Skip to content

Commit

Permalink
Merge pull request #244 from akhilesh26/fix_proptype_warning
Browse files Browse the repository at this point in the history
fix(propType warnings): remove isRequired and set default props to fix propType warnings.
  • Loading branch information
MonkeyDo committed Jan 25, 2019
2 parents b8a4166 + 6c4c588 commit fba56f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/client/components/pages/entities/identifiers.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ function EntityIdentifiers({identifierSet, identifierTypes}) {

EntityIdentifiers.displayName = 'EntityIdentifiers';
EntityIdentifiers.propTypes = {
identifierSet: PropTypes.object.isRequired,
identifierTypes: PropTypes.array.isRequired
identifierSet: PropTypes.object,
identifierTypes: PropTypes.array
};

EntityIdentifiers.defaultProps = {
identifierSet: {},
identifierTypes: []
};

export default EntityIdentifiers;
5 changes: 4 additions & 1 deletion src/client/components/pages/entities/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ function EntityImage({backupIcon, imageUrl}) {
EntityImage.displayName = 'EntityImage';
EntityImage.propTypes = {
backupIcon: PropTypes.string.isRequired,
imageUrl: PropTypes.string.isRequired
imageUrl: PropTypes.string
};

EntityImage.defaultProps = {
imageUrl: ''
};
export default EntityImage;

0 comments on commit fba56f8

Please sign in to comment.