Skip to content

Commit 0c0fcee

Browse files
committed
🧹 remove console props from MobilePreview
1 parent dd1141b commit 0c0fcee

File tree

2 files changed

+24
-31
lines changed

2 files changed

+24
-31
lines changed

client/modules/IDE/components/Console.jsx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -154,27 +154,29 @@ ConsoleComponent.defaultProps = {
154154
consoleEvents: []
155155
};
156156

157-
// const Console = () => {
158-
// const consoleEvents = useSelector(state => state.console);
159-
// const { consoleIsExpanded } = useSelector(state => state.ide);
160-
// const { theme, fontSize } = useSelector(state => state.preferences);
161-
162-
// const dispatch = useDispatch();
163-
164-
// return (
165-
// <ConsoleComponent
166-
// consoleEvents={consoleEvents}
167-
// isExpanded={consoleIsExpanded}
168-
// theme={theme}
169-
// fontSize={fontSize}
170-
// collapseConsole={() => dispatch({})}
171-
// expandConsole={() => dispatch({})}
172-
// clearConsole={() => dispatch({})}
173-
// dispatchConsoleEvent={() => dispatch({})}
174-
// />
175-
// );
176-
// };
177-
157+
// TODO: Use Hooks implementation. Requires react-redux 7.1.0
158+
/*
159+
const Console = () => {
160+
const consoleEvents = useSelector(state => state.console);
161+
const { consoleIsExpanded } = useSelector(state => state.ide);
162+
const { theme, fontSize } = useSelector(state => state.preferences);
163+
164+
const dispatch = useDispatch();
165+
166+
return (
167+
<ConsoleComponent
168+
consoleEvents={consoleEvents}
169+
isExpanded={consoleIsExpanded}
170+
theme={theme}
171+
fontSize={fontSize}
172+
collapseConsole={() => dispatch({})}
173+
expandConsole={() => dispatch({})}
174+
clearConsole={() => dispatch({})}
175+
dispatchConsoleEvent={() => dispatch({})}
176+
/>
177+
);
178+
};
179+
*/
178180

179181
const Console = connect(
180182
state => ({

client/modules/Mobile/MobileSketchView.jsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,13 @@ const MobileSketchView = (props) => {
4141
// Actions
4242
const {
4343
setTextOutput, setGridOutput, setSoundOutput,
44-
endSketchRefresh, stopSketch, console,
44+
endSketchRefresh, stopSketch,
4545
dispatchConsoleEvent, expandConsole, clearConsole,
4646
setBlobUrl,
4747
} = props;
4848

4949
const { preferences, ide } = props;
5050

51-
// FIXME:
52-
const collapseConsole = () => {};
53-
5451
return (
5552
<Screen fullscreen>
5653
<Header
@@ -165,11 +162,6 @@ MobileSketchView.propTypes = {
165162
setBlobUrl: PropTypes.func.isRequired,
166163
expandConsole: PropTypes.func.isRequired,
167164
clearConsole: PropTypes.func.isRequired,
168-
169-
console: PropTypes.arrayOf(PropTypes.shape({
170-
method: PropTypes.string.isRequired,
171-
args: PropTypes.arrayOf(PropTypes.string)
172-
})).isRequired,
173165
};
174166

175167
function mapStateToProps(state) {
@@ -179,7 +171,6 @@ function mapStateToProps(state) {
179171
files: state.files,
180172
ide: state.ide,
181173
preferences: state.preferences,
182-
console: state.console,
183174
selectedFile: state.files.find(file => file.isSelectedFile) ||
184175
state.files.find(file => file.name === 'sketch.js') ||
185176
state.files.find(file => file.name !== 'root'),

0 commit comments

Comments
 (0)