diff --git a/package.json b/package.json index 082fb3c..b5c3922 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "app.js", "scripts": { "dev": "npm run start", - "build-css": "node-sass src/ -o build/", - "watch-css": "npm run build-css && node-sass src/ -o build/ --watch --recursive", + "build-css": "node-sass src/ -o src/", + "watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive", "start-js": "react-scripts start", "start": "npm-run-all -p watch-css start-js --max-old-space-size=4096", "build": "npm run lint && npm run build-css && react-scripts build", diff --git a/src/components/editor/InterfaceEditor.tsx b/src/components/editor/InterfaceEditor.tsx index 846e89a..1d19bca 100644 --- a/src/components/editor/InterfaceEditor.tsx +++ b/src/components/editor/InterfaceEditor.tsx @@ -128,6 +128,7 @@ class InterfaceEditor extends Component< bodyOption={this.state.summaryState.bodyOption} requestParamsType={this.state.summaryState.requestParamsType} handleChangeProperty={this.handleChangeProperty} + handleDeleteMemoryProperty={this.handleDeleteMemoryProperty} /> { static contextTypes = { - onAddForeignRoomCase: PropTypes.func.isRequired, onDeleteInterface: PropTypes.func.isRequired, } constructor(props: any) { @@ -264,17 +263,6 @@ class InterfaceSummary extends Component { /** empty */ } - createCase = (e: any, repositoryId: any, interfaceId: any, name: any) => { - e.preventDefault() - this.setState({ name }) - const { onAddForeignRoomCase } = this.context - onAddForeignRoomCase({ - id: repositoryId, - itf: interfaceId, - name, - }) - // itf.repositoryId - } } const mapStateToProps = (state: RootState) => ({ room: state.foreign, diff --git a/src/components/editor/PropertyList.tsx b/src/components/editor/PropertyList.tsx index e3062ba..90b039e 100644 --- a/src/components/editor/PropertyList.tsx +++ b/src/components/editor/PropertyList.tsx @@ -295,7 +295,7 @@ class PropertyList extends Component { } handleDeleteMemoryProperty = (e: any, property: any) => { e.preventDefault() - const { handleDeleteMemoryProperty } = this.context + const { handleDeleteMemoryProperty } = this.props handleDeleteMemoryProperty(property) } handleSortProperties = (_: any, sortable: any) => {