Adding missing proptypes

This commit is contained in:
Belen Curcio
2017-10-19 10:44:17 -03:00
parent 2a8dc3b506
commit fdddd5f8af
3 changed files with 34 additions and 5 deletions
@@ -1,9 +1,9 @@
import React from 'react';
import {Button} from 'coral-ui';
import PropTypes from 'prop-types';
import t from 'coral-framework/services/i18n';
export default ({status, onClick}) => (
const CloseCommentsInfo = ({status, onClick}) => (
status === 'open' ? (
<div className="close-comments-intro-wrapper">
<p>
@@ -20,3 +20,10 @@ export default ({status, onClick}) => (
</div>
)
);
CloseCommentsInfo.propTypes = {
status: PropTypes.string,
onClick: PropTypes.onClick,
};
export default CloseCommentsInfo;
@@ -303,11 +303,32 @@ class Stream extends React.Component {
}
Stream.propTypes = {
activeStreamTab: PropTypes.string,
data: PropTypes.object,
root: PropTypes.object,
activeReplyBox: PropTypes.string,
setActiveReplyBox: PropTypes.func,
commentClassNames: PropTypes.array,
setActiveStreamTab: PropTypes.func,
loadMoreComments: PropTypes.func,
postFlag: PropTypes.func,
postDontAgree: PropTypes.func,
deleteAction: PropTypes.func,
showSignInDialog: PropTypes.func,
loadNewReplies: PropTypes.func,
auth: PropTypes.object,
emit: PropTypes.func,
sortOrder: PropTypes.string,
sortBy: PropTypes.string,
loading: PropTypes.bool,
editName: PropTypes.func,
appendItemArray: PropTypes.func,
updateItem: PropTypes.func,
viewAllComments: PropTypes.func,
notify: PropTypes.func.isRequired,
postComment: PropTypes.func.isRequired,
// edit a comment, passed (id, asset_id, { body })
editComment: PropTypes.func
editComment: PropTypes.func,
userIsDegraged: PropTypes.bool,
};
export default Stream;
@@ -17,6 +17,7 @@ function getFragmentId(assetId) {
* AutomaticAssetClosure updates the graphql state of the provide asset
* to `isClosed=true` when passed `closedAt`.
*/
class AutomaticAssetClosure extends React.Component {
static contextTypes = {
client: PropTypes.object.isRequired,