remove: unused dispatches from multifile editor (#44493)
This commit is contained in:
@ -7,11 +7,7 @@ import { isDonationModalOpenSelector, userSelector } from '../../../redux';
|
|||||||
import {
|
import {
|
||||||
canFocusEditorSelector,
|
canFocusEditorSelector,
|
||||||
consoleOutputSelector,
|
consoleOutputSelector,
|
||||||
executeChallenge,
|
visibleEditorsSelector
|
||||||
saveEditorContent,
|
|
||||||
setEditorFocusability,
|
|
||||||
visibleEditorsSelector,
|
|
||||||
updateFile
|
|
||||||
} from '../redux';
|
} from '../redux';
|
||||||
import { getTargetEditor } from '../utils/getTargetEditor';
|
import { getTargetEditor } from '../utils/getTargetEditor';
|
||||||
import './editor.css';
|
import './editor.css';
|
||||||
@ -26,7 +22,6 @@ const propTypes = {
|
|||||||
description: PropTypes.string,
|
description: PropTypes.string,
|
||||||
dimensions: PropTypes.object,
|
dimensions: PropTypes.object,
|
||||||
editorRef: PropTypes.any.isRequired,
|
editorRef: PropTypes.any.isRequired,
|
||||||
executeChallenge: PropTypes.func.isRequired,
|
|
||||||
ext: PropTypes.string,
|
ext: PropTypes.string,
|
||||||
fileKey: PropTypes.string,
|
fileKey: PropTypes.string,
|
||||||
initialEditorContent: PropTypes.string,
|
initialEditorContent: PropTypes.string,
|
||||||
@ -37,11 +32,8 @@ const propTypes = {
|
|||||||
onStopResize: PropTypes.func,
|
onStopResize: PropTypes.func,
|
||||||
onResize: PropTypes.func
|
onResize: PropTypes.func
|
||||||
}),
|
}),
|
||||||
saveEditorContent: PropTypes.func.isRequired,
|
|
||||||
setEditorFocusability: PropTypes.func,
|
|
||||||
theme: PropTypes.string,
|
theme: PropTypes.string,
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
updateFile: PropTypes.func.isRequired,
|
|
||||||
usesMultifileEditor: PropTypes.bool,
|
usesMultifileEditor: PropTypes.bool,
|
||||||
visibleEditors: PropTypes.shape({
|
visibleEditors: PropTypes.shape({
|
||||||
scriptjs: PropTypes.bool,
|
scriptjs: PropTypes.bool,
|
||||||
@ -65,13 +57,6 @@ const mapStateToProps = createSelector(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const mapDispatchToProps = {
|
|
||||||
executeChallenge,
|
|
||||||
saveEditorContent,
|
|
||||||
setEditorFocusability,
|
|
||||||
updateFile
|
|
||||||
};
|
|
||||||
|
|
||||||
const MultifileEditor = props => {
|
const MultifileEditor = props => {
|
||||||
const {
|
const {
|
||||||
challengeFiles,
|
challengeFiles,
|
||||||
@ -159,4 +144,4 @@ const MultifileEditor = props => {
|
|||||||
MultifileEditor.displayName = 'MultifileEditor';
|
MultifileEditor.displayName = 'MultifileEditor';
|
||||||
MultifileEditor.propTypes = propTypes;
|
MultifileEditor.propTypes = propTypes;
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(MultifileEditor);
|
export default connect(mapStateToProps)(MultifileEditor);
|
||||||
|
Reference in New Issue
Block a user