diff --git a/client/modules/IDE/components/AssetList.jsx b/client/modules/IDE/components/AssetList.jsx index 821ae152..8c5d0826 100644 --- a/client/modules/IDE/components/AssetList.jsx +++ b/client/modules/IDE/components/AssetList.jsx @@ -86,8 +86,8 @@ AssetList.propTypes = { key: PropTypes.string.isRequired, name: PropTypes.string.isRequired, url: PropTypes.string.isRequired, - sketchName: PropTypes.string.isRequired, - sketchId: PropTypes.string.isRequired + sketchName: PropTypes.string, + sketchId: PropTypes.string })).isRequired, getAssets: PropTypes.func.isRequired, loading: PropTypes.bool.isRequired diff --git a/client/modules/IDE/components/CollectionList/CollectionList.jsx b/client/modules/IDE/components/CollectionList/CollectionList.jsx index 02a43297..e39d3c86 100644 --- a/client/modules/IDE/components/CollectionList/CollectionList.jsx +++ b/client/modules/IDE/components/CollectionList/CollectionList.jsx @@ -62,7 +62,6 @@ class CollectionList extends React.Component { } hideAddSketches = () => { - console.log('hideAddSketches'); this.setState({ addingSketchesToCollectionId: null, }); @@ -161,28 +160,12 @@ class CollectionList extends React.Component { } } -const ProjectShape = PropTypes.shape({ - id: PropTypes.string.isRequired, - name: PropTypes.string.isRequired, - createdAt: PropTypes.string.isRequired, - updatedAt: PropTypes.string.isRequired, - user: PropTypes.shape({ - username: PropTypes.string.isRequired - }).isRequired, -}); - -const ItemsShape = PropTypes.shape({ - createdAt: PropTypes.string.isRequired, - updatedAt: PropTypes.string.isRequired, - project: ProjectShape -}); - CollectionList.propTypes = { user: PropTypes.shape({ username: PropTypes.string, authenticated: PropTypes.bool.isRequired }).isRequired, - projectId: PropTypes.string.isRequired, + projectId: PropTypes.string, getCollections: PropTypes.func.isRequired, getProject: PropTypes.func.isRequired, collections: PropTypes.arrayOf(PropTypes.shape({ @@ -191,7 +174,6 @@ CollectionList.propTypes = { description: PropTypes.string, createdAt: PropTypes.string.isRequired, updatedAt: PropTypes.string.isRequired, - items: PropTypes.arrayOf(ItemsShape), })).isRequired, username: PropTypes.string, loading: PropTypes.bool.isRequired, @@ -210,6 +192,7 @@ CollectionList.propTypes = { }; CollectionList.defaultProps = { + projectId: undefined, project: { id: undefined, owner: undefined @@ -224,7 +207,7 @@ function mapStateToProps(state, ownProps) { sorting: state.sorting, loading: state.loading, project: state.project, - projectId: ownProps && ownProps.params ? ownProps.prams.project_id : null, + projectId: ownProps && ownProps.params ? ownProps.params.project_id : null, }; } diff --git a/client/modules/IDE/components/CollectionList/CollectionListRow.jsx b/client/modules/IDE/components/CollectionList/CollectionListRow.jsx index 47bd135b..93513511 100644 --- a/client/modules/IDE/components/CollectionList/CollectionListRow.jsx +++ b/client/modules/IDE/components/CollectionList/CollectionListRow.jsx @@ -235,9 +235,6 @@ CollectionListRowBase.propTypes = { }) })) }).isRequired, - project: PropTypes.shape({ - id: PropTypes.string.isRequired, - }).isRequired, username: PropTypes.string.isRequired, user: PropTypes.shape({ username: PropTypes.string, diff --git a/client/modules/IDE/components/QuickAddList/QuickAddList.jsx b/client/modules/IDE/components/QuickAddList/QuickAddList.jsx index 3d566654..e4d5e6d7 100644 --- a/client/modules/IDE/components/QuickAddList/QuickAddList.jsx +++ b/client/modules/IDE/components/QuickAddList/QuickAddList.jsx @@ -23,7 +23,9 @@ const ItemType = PropTypes.shape({ }); Item.propTypes = { - ...ItemType, + name: PropTypes.string.isRequired, + url: PropTypes.string.isRequired, + isAdded: PropTypes.bool.isRequired, onSelect: PropTypes.func.isRequired, }; diff --git a/client/modules/User/pages/DashboardView.jsx b/client/modules/User/pages/DashboardView.jsx index 9ba5a945..e51490de 100644 --- a/client/modules/User/pages/DashboardView.jsx +++ b/client/modules/User/pages/DashboardView.jsx @@ -171,7 +171,7 @@ DashboardView.propTypes = { previousPath: PropTypes.string.isRequired, theme: PropTypes.string.isRequired, user: PropTypes.shape({ - username: PropTypes.string.isRequired, + username: PropTypes.string, }), };