File tree 2 files changed +20
-16
lines changed
2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,16 @@ export class FeedbackBar extends Component {
117
117
time : new Date ( ) . toUTCString ( )
118
118
} ;
119
119
120
- fetch ( "/submitComment" , {
121
- body : JSON . stringify ( payload ) ,
122
- cache : "no-cache" ,
123
- headers : {
124
- "content-type" : "application/json"
125
- } ,
126
- method : "POST"
127
- } ) . catch ( err => Raven . captureException ( err ) ) ;
120
+ if ( payload . whatWentWrong || payload . howCanInfoBeMoreUseful ) {
121
+ fetch ( "/submitComment" , {
122
+ body : JSON . stringify ( payload ) ,
123
+ cache : "no-cache" ,
124
+ headers : {
125
+ "content-type" : "application/json"
126
+ } ,
127
+ method : "POST"
128
+ } ) . catch ( err => Raven . captureException ( err ) ) ;
129
+ }
128
130
} ;
129
131
130
132
sendFeedback = answer => {
Original file line number Diff line number Diff line change @@ -86,14 +86,16 @@ export class Feedback extends Component {
86
86
time : new Date ( ) . toUTCString ( )
87
87
} ;
88
88
89
- fetch ( "/submitBetaFeedback" , {
90
- body : JSON . stringify ( payload ) ,
91
- cache : "no-cache" ,
92
- headers : {
93
- "content-type" : "application/json"
94
- } ,
95
- method : "POST"
96
- } ) . catch ( err => Raven . captureException ( err ) ) ;
89
+ if ( payload . how_was_your_experience || payload . what_did_you_think ) {
90
+ fetch ( "/submitBetaFeedback" , {
91
+ body : JSON . stringify ( payload ) ,
92
+ cache : "no-cache" ,
93
+ headers : {
94
+ "content-type" : "application/json"
95
+ } ,
96
+ method : "POST"
97
+ } ) . catch ( err => Raven . captureException ( err ) ) ;
98
+ }
97
99
} ;
98
100
99
101
render ( ) {
You can’t perform that action at this time.
0 commit comments