From 92010e90038d64e8212604787d73fc3ec417664f Mon Sep 17 00:00:00 2001 From: Chris Beer Date: Fri, 8 Nov 2024 08:56:12 -0800 Subject: [PATCH] Stop passing tReady through to the MUI menu component. --- src/components/WindowList.js | 4 +++- src/components/WorkspaceMenu.js | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/WindowList.js b/src/components/WindowList.js index 2db96ba42..58f39d3c4 100644 --- a/src/components/WindowList.js +++ b/src/components/WindowList.js @@ -24,7 +24,7 @@ export class WindowList extends Component { */ render() { const { - container, handleClose, windowIds, focusWindow, focusedWindowId, t, + container, handleClose, windowIds, focusWindow, focusedWindowId, t, tReady, ...menuProps } = this.props; @@ -73,6 +73,7 @@ WindowList.propTypes = { handleClose: PropTypes.func.isRequired, t: PropTypes.func, titles: PropTypes.objectOf(PropTypes.string), + tReady: PropTypes.bool, windowIds: PropTypes.arrayOf(PropTypes.string).isRequired, }; @@ -81,4 +82,5 @@ WindowList.defaultProps = { focusedWindowId: null, t: key => key, titles: {}, + tReady: false, }; diff --git a/src/components/WorkspaceMenu.js b/src/components/WorkspaceMenu.js index c6e9a191a..3a9b26ecb 100644 --- a/src/components/WorkspaceMenu.js +++ b/src/components/WorkspaceMenu.js @@ -69,12 +69,11 @@ export class WorkspaceMenu extends Component { showThemePicker, isWorkspaceAddVisible, t, + tReady, showZoomControls, toggleZoomControls, - ...rest + ...menuProps } = this.props; - const menuProps = { ...rest }; - delete menuProps.tReady; const { changeTheme, @@ -156,6 +155,7 @@ WorkspaceMenu.propTypes = { showZoomControls: PropTypes.bool, t: PropTypes.func, toggleZoomControls: PropTypes.func, + tReady: PropTypes.bool, }; WorkspaceMenu.defaultProps = { @@ -165,4 +165,5 @@ WorkspaceMenu.defaultProps = { showZoomControls: false, t: key => key, toggleZoomControls: () => {}, + tReady: false, };