From fae21bed9c46cc6f25a4acfc164f7b5b4e4d007d Mon Sep 17 00:00:00 2001 From: dannyrb Date: Tue, 26 May 2020 09:02:47 -0400 Subject: [PATCH] Allow empty slots for rightPanels and leftPanels --- extensions/default/src/ViewerLayout/index.jsx | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/extensions/default/src/ViewerLayout/index.jsx b/extensions/default/src/ViewerLayout/index.jsx index caff0abfc..2f9273f52 100644 --- a/extensions/default/src/ViewerLayout/index.jsx +++ b/extensions/default/src/ViewerLayout/index.jsx @@ -135,11 +135,13 @@ function ViewerLayout({ style={{ height: 'calc(100vh - 57px' }} > {/* LEFT SIDEPANELS */} - + {leftPanelComponents.length && ( + + )} {/* TOOLBAR + GRID */}
@@ -206,11 +208,13 @@ function ViewerLayout({ />*/}
- + {rightPanelComponents.length && ( + + )} ); @@ -237,4 +241,9 @@ ViewerLayout.propTypes = { children: PropTypes.oneOfType(PropTypes.node, PropTypes.func).isRequired, }; +ViewerLayout.defaultProps = { + leftPanels: [], + rightPanels: [], +}; + export default ViewerLayout;