From 0c0fceee1a5229c20149f346f8f79d326b528db5 Mon Sep 17 00:00:00 2001 From: ghalestrilo Date: Wed, 15 Jul 2020 18:26:34 -0300 Subject: [PATCH] :broom: remove console props from MobilePreview --- client/modules/IDE/components/Console.jsx | 40 ++++++++++++---------- client/modules/Mobile/MobileSketchView.jsx | 11 +----- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/client/modules/IDE/components/Console.jsx b/client/modules/IDE/components/Console.jsx index e62b9236..2bd3af7e 100644 --- a/client/modules/IDE/components/Console.jsx +++ b/client/modules/IDE/components/Console.jsx @@ -154,27 +154,29 @@ ConsoleComponent.defaultProps = { consoleEvents: [] }; -// const Console = () => { -// const consoleEvents = useSelector(state => state.console); -// const { consoleIsExpanded } = useSelector(state => state.ide); -// const { theme, fontSize } = useSelector(state => state.preferences); +// TODO: Use Hooks implementation. Requires react-redux 7.1.0 +/* +const Console = () => { + const consoleEvents = useSelector(state => state.console); + const { consoleIsExpanded } = useSelector(state => state.ide); + const { theme, fontSize } = useSelector(state => state.preferences); -// const dispatch = useDispatch(); - -// return ( -// dispatch({})} -// expandConsole={() => dispatch({})} -// clearConsole={() => dispatch({})} -// dispatchConsoleEvent={() => dispatch({})} -// /> -// ); -// }; + const dispatch = useDispatch(); + return ( + dispatch({})} + expandConsole={() => dispatch({})} + clearConsole={() => dispatch({})} + dispatchConsoleEvent={() => dispatch({})} + /> + ); +}; + */ const Console = connect( state => ({ diff --git a/client/modules/Mobile/MobileSketchView.jsx b/client/modules/Mobile/MobileSketchView.jsx index 2c47450b..91b7c41f 100644 --- a/client/modules/Mobile/MobileSketchView.jsx +++ b/client/modules/Mobile/MobileSketchView.jsx @@ -41,16 +41,13 @@ const MobileSketchView = (props) => { // Actions const { setTextOutput, setGridOutput, setSoundOutput, - endSketchRefresh, stopSketch, console, + endSketchRefresh, stopSketch, dispatchConsoleEvent, expandConsole, clearConsole, setBlobUrl, } = props; const { preferences, ide } = props; - // FIXME: - const collapseConsole = () => {}; - return (
file.isSelectedFile) || state.files.find(file => file.name === 'sketch.js') || state.files.find(file => file.name !== 'root'),