Fix linting and prop type errors
This commit is contained in:
parent
954d632276
commit
294b297d49
4 changed files with 15 additions and 11 deletions
|
@ -227,6 +227,13 @@ CollectionListRowBase.propTypes = {
|
||||||
owner: PropTypes.shape({
|
owner: PropTypes.shape({
|
||||||
username: PropTypes.string.isRequired,
|
username: PropTypes.string.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
|
createdAt: PropTypes.string.isRequired,
|
||||||
|
updatedAt: PropTypes.string.isRequired,
|
||||||
|
items: PropTypes.arrayOf(PropTypes.shape({
|
||||||
|
project: PropTypes.shape({
|
||||||
|
id: PropTypes.string.isRequired
|
||||||
|
})
|
||||||
|
}))
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
project: PropTypes.shape({
|
project: PropTypes.shape({
|
||||||
id: PropTypes.string.isRequired,
|
id: PropTypes.string.isRequired,
|
||||||
|
|
|
@ -437,15 +437,6 @@ SketchList.propTypes = {
|
||||||
createdAt: PropTypes.string.isRequired,
|
createdAt: PropTypes.string.isRequired,
|
||||||
updatedAt: PropTypes.string.isRequired
|
updatedAt: PropTypes.string.isRequired
|
||||||
})).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,
|
username: PropTypes.string,
|
||||||
loading: PropTypes.bool.isRequired,
|
loading: PropTypes.bool.isRequired,
|
||||||
toggleDirectionForField: PropTypes.func.isRequired,
|
toggleDirectionForField: PropTypes.func.isRequired,
|
||||||
|
|
|
@ -89,9 +89,13 @@ CollectionItemRowBase.propTypes = {
|
||||||
name: PropTypes.string.isRequired
|
name: PropTypes.string.isRequired
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
item: PropTypes.shape({
|
item: PropTypes.shape({
|
||||||
|
createdAt: PropTypes.string.isRequired,
|
||||||
project: PropTypes.shape({
|
project: PropTypes.shape({
|
||||||
id: PropTypes.string.isRequired,
|
id: PropTypes.string.isRequired,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
|
user: PropTypes.shape({
|
||||||
|
username: PropTypes.string.isRequired
|
||||||
|
})
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
user: PropTypes.shape({
|
user: PropTypes.shape({
|
||||||
|
@ -204,7 +208,9 @@ class Collection extends React.Component {
|
||||||
<div className="collection-metadata__column--left">
|
<div className="collection-metadata__column--left">
|
||||||
<h2 className="collection-metadata__name">
|
<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>
|
</h2>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ const Tab = ({ children, isSelected, to }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
Tab.propTypes = {
|
Tab.propTypes = {
|
||||||
children: PropTypes.element.isRequired,
|
children: PropTypes.string.isRequired,
|
||||||
isSelected: PropTypes.bool.isRequired,
|
isSelected: PropTypes.bool.isRequired,
|
||||||
to: PropTypes.string.isRequired,
|
to: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue