Fix linting and prop type errors

This commit is contained in:
Cassie Tarakajian 2020-01-29 12:31:33 -05:00
parent 954d632276
commit 294b297d49
4 changed files with 15 additions and 11 deletions

View file

@ -227,6 +227,13 @@ CollectionListRowBase.propTypes = {
owner: PropTypes.shape({
username: PropTypes.string.isRequired,
}).isRequired,
createdAt: PropTypes.string.isRequired,
updatedAt: PropTypes.string.isRequired,
items: PropTypes.arrayOf(PropTypes.shape({
project: PropTypes.shape({
id: PropTypes.string.isRequired
})
}))
}).isRequired,
project: PropTypes.shape({
id: PropTypes.string.isRequired,

View file

@ -437,15 +437,6 @@ SketchList.propTypes = {
createdAt: PropTypes.string.isRequired,
updatedAt: PropTypes.string.isRequired
})).isRequired,
collection: PropTypes.shape({
id: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
items: PropTypes.arrayOf(PropTypes.shape({
project: PropTypes.shape({
id: PropTypes.string.isRequired,
}),
})),
}).isRequired,
username: PropTypes.string,
loading: PropTypes.bool.isRequired,
toggleDirectionForField: PropTypes.func.isRequired,

View file

@ -89,9 +89,13 @@ CollectionItemRowBase.propTypes = {
name: PropTypes.string.isRequired
}).isRequired,
item: PropTypes.shape({
createdAt: PropTypes.string.isRequired,
project: PropTypes.shape({
id: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
user: PropTypes.shape({
username: PropTypes.string.isRequired
})
}).isRequired,
}).isRequired,
user: PropTypes.shape({
@ -204,7 +208,9 @@ class Collection extends React.Component {
<div className="collection-metadata__column--left">
<h2 className="collection-metadata__name">
{
this.isOwner() ? <EditableInput value={name} onChange={handleEditCollectionName} validate={value => value !== ''} /> : name
this.isOwner() ?
<EditableInput value={name} onChange={handleEditCollectionName} validate={value => value !== ''} /> :
name
}
</h2>

View file

@ -23,7 +23,7 @@ const Tab = ({ children, isSelected, to }) => {
};
Tab.propTypes = {
children: PropTypes.element.isRequired,
children: PropTypes.string.isRequired,
isSelected: PropTypes.bool.isRequired,
to: PropTypes.string.isRequired,
};