Skip to content

Commit

Permalink
fix the dismissed survey logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Aug 6, 2024
1 parent 751ac44 commit c316fd9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions frontend/src/scenes/billing/billingProductLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,8 @@ export const billingProductLogic = kea<billingProductLogicType>([
actions.setSurveyID('')
},
deactivateProductSuccess: async (_, breakpoint) => {
if (!values.unsubscribeError) {
const hasSurveyReasons = values.surveyResponse['$survey_response_2']?.length > 0
const textAreaNotEmpty = values.surveyResponse['$survey_response']?.length > 0
const shouldReportSurvey = hasSurveyReasons || textAreaNotEmpty
shouldReportSurvey
? actions.reportSurveySent(values.surveyID, values.surveyResponse)
: actions.reportSurveyDismissed(values.surveyID)
if (!values.unsubscribeError && values.surveyID) {
actions.reportSurveySent(values.surveyID, values.surveyResponse)
}
await breakpoint(200)
location.reload()
Expand Down

0 comments on commit c316fd9

Please sign in to comment.