From 294b297d4974013560643b4338d6625e149884e4 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 29 Jan 2020 12:31:33 -0500 Subject: [PATCH] Fix linting and prop type errors --- .../IDE/components/CollectionList/CollectionListRow.jsx | 7 +++++++ client/modules/IDE/components/SketchList.jsx | 9 --------- client/modules/User/components/Collection.jsx | 8 +++++++- client/modules/User/components/DashboardTabSwitcher.jsx | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/client/modules/IDE/components/CollectionList/CollectionListRow.jsx b/client/modules/IDE/components/CollectionList/CollectionListRow.jsx index 6b714bde..47bd135b 100644 --- a/client/modules/IDE/components/CollectionList/CollectionListRow.jsx +++ b/client/modules/IDE/components/CollectionList/CollectionListRow.jsx @@ -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, diff --git a/client/modules/IDE/components/SketchList.jsx b/client/modules/IDE/components/SketchList.jsx index 2f25c7a7..26ad3d7c 100644 --- a/client/modules/IDE/components/SketchList.jsx +++ b/client/modules/IDE/components/SketchList.jsx @@ -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, diff --git a/client/modules/User/components/Collection.jsx b/client/modules/User/components/Collection.jsx index 002d9921..1a338388 100644 --- a/client/modules/User/components/Collection.jsx +++ b/client/modules/User/components/Collection.jsx @@ -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 {

{ - this.isOwner() ? value !== ''} /> : name + this.isOwner() ? + value !== ''} /> : + name }

diff --git a/client/modules/User/components/DashboardTabSwitcher.jsx b/client/modules/User/components/DashboardTabSwitcher.jsx index cab9132c..b3b03c44 100644 --- a/client/modules/User/components/DashboardTabSwitcher.jsx +++ b/client/modules/User/components/DashboardTabSwitcher.jsx @@ -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, };