From 7485d40c054f31fb65aea0a1694d6fe312e317a3 Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Fri, 21 Jun 2019 17:33:31 +0200 Subject: [PATCH] [desk-tool] Remove unused props from withDocumentType HOC --- .../desk-tool/src/utils/withDocumentType.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/@sanity/desk-tool/src/utils/withDocumentType.js b/packages/@sanity/desk-tool/src/utils/withDocumentType.js index 81d9c022ab4..ace75c36955 100644 --- a/packages/@sanity/desk-tool/src/utils/withDocumentType.js +++ b/packages/@sanity/desk-tool/src/utils/withDocumentType.js @@ -5,28 +5,17 @@ import LoadingPane from '../pane/LoadingPane' import ErrorPane from '../pane/ErrorPane' // Resolves the type for a document if not present -export default function withDocument(Pane) { +export default function withDocumentType(Pane) { return class WithDocumentType extends React.PureComponent { static displayName = `withDocumentType(${Pane.displayName || Pane.name})` static propTypes = { - isSelected: PropTypes.bool.isRequired, - isCollapsed: PropTypes.bool.isRequired, - onExpand: PropTypes.func, - onCollapse: PropTypes.func, - path: PropTypes.arrayOf(PropTypes.string), options: PropTypes.shape({ id: PropTypes.string.isRequired, type: PropTypes.string }).isRequired } - static defaultProps = { - path: [], - onExpand: undefined, - onCollapse: undefined - } - constructor(props) { super(props) @@ -69,7 +58,7 @@ export default function withDocument(Pane) { } // Undecided, still loading type from server - return + return } } }