File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import { connect } from 'react-redux' ;
4
+ import { create } from '../helpers/http' ;
5
+ import { getApiUrl } from '../helpers/url' ;
4
6
import {
5
7
Button ,
6
8
Modal ,
@@ -136,9 +138,8 @@ export class InternalIssueFilerClass extends React.Component {
136
138
137
139
submitInternalIssue = async ( ) => {
138
140
const { summary } = this . state ;
139
- const { notify } = this . props ;
140
141
141
- notify ( summary , 'danger' ) ;
142
+ create ( getApiUrl ( '/internal_issue/' ) , { summary } ) ;
142
143
} ;
143
144
144
145
render ( ) {
@@ -161,13 +162,16 @@ export class InternalIssueFilerClass extends React.Component {
161
162
type = "text"
162
163
placeholder = "Intermittent..."
163
164
pattern = ".{0,255}"
164
- defaultValue = { summary }
165
+ value = { summary }
166
+ onChange = { ( evt ) =>
167
+ this . setState ( { summary : evt . target . value } )
168
+ }
165
169
/>
166
170
</ div >
167
171
</ form >
168
172
</ ModalBody >
169
173
< ModalFooter >
170
- < Button color = "secondary" onClick = { this . submitFiler } >
174
+ < Button color = "secondary" onClick = { this . submitInternalIssue } >
171
175
Submit Internal Issue
172
176
</ Button > { ' ' }
173
177
< Button color = "secondary" onClick = { toggle } >
You can’t perform that action at this time.
0 commit comments