🧹 remove console props from MobilePreview
This commit is contained in:
parent
dd1141bfbc
commit
0c0fceee1a
2 changed files with 22 additions and 29 deletions
|
@ -154,27 +154,29 @@ ConsoleComponent.defaultProps = {
|
||||||
consoleEvents: []
|
consoleEvents: []
|
||||||
};
|
};
|
||||||
|
|
||||||
// const Console = () => {
|
// TODO: Use Hooks implementation. Requires react-redux 7.1.0
|
||||||
// const consoleEvents = useSelector(state => state.console);
|
/*
|
||||||
// const { consoleIsExpanded } = useSelector(state => state.ide);
|
const Console = () => {
|
||||||
// const { theme, fontSize } = useSelector(state => state.preferences);
|
const consoleEvents = useSelector(state => state.console);
|
||||||
|
const { consoleIsExpanded } = useSelector(state => state.ide);
|
||||||
|
const { theme, fontSize } = useSelector(state => state.preferences);
|
||||||
|
|
||||||
// const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
// return (
|
|
||||||
// <ConsoleComponent
|
|
||||||
// consoleEvents={consoleEvents}
|
|
||||||
// isExpanded={consoleIsExpanded}
|
|
||||||
// theme={theme}
|
|
||||||
// fontSize={fontSize}
|
|
||||||
// collapseConsole={() => dispatch({})}
|
|
||||||
// expandConsole={() => dispatch({})}
|
|
||||||
// clearConsole={() => dispatch({})}
|
|
||||||
// dispatchConsoleEvent={() => dispatch({})}
|
|
||||||
// />
|
|
||||||
// );
|
|
||||||
// };
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ConsoleComponent
|
||||||
|
consoleEvents={consoleEvents}
|
||||||
|
isExpanded={consoleIsExpanded}
|
||||||
|
theme={theme}
|
||||||
|
fontSize={fontSize}
|
||||||
|
collapseConsole={() => dispatch({})}
|
||||||
|
expandConsole={() => dispatch({})}
|
||||||
|
clearConsole={() => dispatch({})}
|
||||||
|
dispatchConsoleEvent={() => dispatch({})}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
const Console = connect(
|
const Console = connect(
|
||||||
state => ({
|
state => ({
|
||||||
|
|
|
@ -41,16 +41,13 @@ const MobileSketchView = (props) => {
|
||||||
// Actions
|
// Actions
|
||||||
const {
|
const {
|
||||||
setTextOutput, setGridOutput, setSoundOutput,
|
setTextOutput, setGridOutput, setSoundOutput,
|
||||||
endSketchRefresh, stopSketch, console,
|
endSketchRefresh, stopSketch,
|
||||||
dispatchConsoleEvent, expandConsole, clearConsole,
|
dispatchConsoleEvent, expandConsole, clearConsole,
|
||||||
setBlobUrl,
|
setBlobUrl,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const { preferences, ide } = props;
|
const { preferences, ide } = props;
|
||||||
|
|
||||||
// FIXME:
|
|
||||||
const collapseConsole = () => {};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Screen fullscreen>
|
<Screen fullscreen>
|
||||||
<Header
|
<Header
|
||||||
|
@ -165,11 +162,6 @@ MobileSketchView.propTypes = {
|
||||||
setBlobUrl: PropTypes.func.isRequired,
|
setBlobUrl: PropTypes.func.isRequired,
|
||||||
expandConsole: PropTypes.func.isRequired,
|
expandConsole: PropTypes.func.isRequired,
|
||||||
clearConsole: PropTypes.func.isRequired,
|
clearConsole: PropTypes.func.isRequired,
|
||||||
|
|
||||||
console: PropTypes.arrayOf(PropTypes.shape({
|
|
||||||
method: PropTypes.string.isRequired,
|
|
||||||
args: PropTypes.arrayOf(PropTypes.string)
|
|
||||||
})).isRequired,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
|
@ -179,7 +171,6 @@ function mapStateToProps(state) {
|
||||||
files: state.files,
|
files: state.files,
|
||||||
ide: state.ide,
|
ide: state.ide,
|
||||||
preferences: state.preferences,
|
preferences: state.preferences,
|
||||||
console: state.console,
|
|
||||||
selectedFile: state.files.find(file => file.isSelectedFile) ||
|
selectedFile: state.files.find(file => file.isSelectedFile) ||
|
||||||
state.files.find(file => file.name === 'sketch.js') ||
|
state.files.find(file => file.name === 'sketch.js') ||
|
||||||
state.files.find(file => file.name !== 'root'),
|
state.files.find(file => file.name !== 'root'),
|
||||||
|
|
Loading…
Reference in a new issue