Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Bosn committed Jul 18, 2019
1 parent 924c000 commit 19ed404
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/components/editor/InterfaceEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class InterfaceEditor extends Component<
bodyOption={this.state.summaryState.bodyOption}
requestParamsType={this.state.summaryState.requestParamsType}
handleChangeProperty={this.handleChangeProperty}
handleDeleteMemoryProperty={this.handleDeleteMemoryProperty}
/>
<ResponsePropertyList
properties={this.state.properties}
Expand All @@ -136,6 +137,7 @@ class InterfaceEditor extends Component<
mod={mod}
itf={this.state.itf}
handleChangeProperty={this.handleChangeProperty}
handleDeleteMemoryProperty={this.handleDeleteMemoryProperty}
/>
<RModal
when={this.state.moveInterfaceDialogOpen}
Expand Down
12 changes: 0 additions & 12 deletions src/components/editor/InterfaceSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ type InterfaceSummaryState = {
}
class InterfaceSummary extends Component<InterfaceSummaryProps, InterfaceSummaryState> {
static contextTypes = {
onAddForeignRoomCase: PropTypes.func.isRequired,
onDeleteInterface: PropTypes.func.isRequired,
}
constructor(props: any) {
Expand Down Expand Up @@ -264,17 +263,6 @@ class InterfaceSummary extends Component<InterfaceSummaryProps, InterfaceSummary
}
}
handleUpdate = () => { /** 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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/editor/PropertyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class PropertyList extends Component<any, any> {
}
handleDeleteMemoryProperty = (e: any, property: any) => {
e.preventDefault()
const { handleDeleteMemoryProperty } = this.context
const { handleDeleteMemoryProperty } = this.props
handleDeleteMemoryProperty(property)
}
handleSortProperties = (_: any, sortable: any) => {
Expand Down

0 comments on commit 19ed404

Please sign in to comment.