Skip to content

Commit

Permalink
chore: update the dismissed survey logic (#24224)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield authored Aug 7, 2024
1 parent 66303c7 commit b97089b
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 b97089b

Please sign in to comment.