Skip to content

Commit

Permalink
fix(surveys): Fix survey prop naming (#18225)
Browse files Browse the repository at this point in the history
* update dismiss to dismissed

* add survey responded user property

* survey responded fix
  • Loading branch information
liyiy authored Oct 26, 2023
1 parent 8919ee6 commit 90b5066
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/lib/taxonomy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -797,16 +797,16 @@ export function getKeyMapping(
data.description = `${data.description} Data from the first time this user was seen.`
}
return data
} else if (value.startsWith('$survey_response/')) {
const surveyId = value.replace(/^\$survey_response\//, '')
} else if (value.startsWith('$survey_responded/')) {
const surveyId = value.replace(/^\$survey_responded\//, '')
if (surveyId) {
return {
label: `Survey Responded: ${surveyId}`,
description: `Whether the user responded to survey with ID: "${surveyId}".`,
}
}
} else if (value.startsWith('$survey_dismiss/')) {
const surveyId = value.replace(/^\$survey_dismiss\//, '')
} else if (value.startsWith('$survey_dismissed/')) {
const surveyId = value.replace(/^\$survey_dismissed\//, '')
if (surveyId) {
return {
label: `Survey Dismissed: ${surveyId}`,
Expand Down

0 comments on commit 90b5066

Please sign in to comment.