Skip to content

Commit

Permalink
fix: typo in survey summary rating captured event (#27029)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
pauldambra and github-actions[bot] authored Dec 19, 2024
1 parent df3ea8d commit f111ceb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions frontend/src/scenes/surveys/surveyViewViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export function RatingQuestionBarChart({
}
useEffect(() => {
loadSurveyRatingResults({ questionIndex, iteration })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [questionIndex])

return (
Expand Down Expand Up @@ -301,6 +302,7 @@ export function NPSSurveyResultsBarChart({

useEffect(() => {
loadSurveyRecurringNPSResults({ questionIndex })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [questionIndex])

return (
Expand Down Expand Up @@ -397,6 +399,7 @@ export function SingleChoiceQuestionPieChart({

useEffect(() => {
loadSurveySingleChoiceResults({ questionIndex })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [questionIndex])

return (
Expand Down Expand Up @@ -499,12 +502,15 @@ export function MultipleChoiceQuestionBarChart({

useEffect(() => {
loadSurveyMultipleChoiceResults({ questionIndex })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [questionIndex])

useEffect(() => {
if (surveyMultipleChoiceResults?.[questionIndex]?.data?.length) {
setChartHeight(100 + 20 * surveyMultipleChoiceResults[questionIndex].data.length)
}
// TODO this one maybe should have questionIndex as a dependency
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [surveyMultipleChoiceResults])

return (
Expand Down Expand Up @@ -581,6 +587,7 @@ export function OpenTextViz({

useEffect(() => {
loadSurveyOpenTextResults({ questionIndex })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [questionIndex])

return (
Expand Down Expand Up @@ -736,9 +743,9 @@ function ResponseSummaryFeedback({ surveyId }: { surveyId: string }): JSX.Elemen
return // Already rated
}
setRating(newRating)
posthog.capture('survey_resonse_rated', {
posthog.capture('ai_survey_summary_rated', {
survey_id: surveyId,
answer_rating: rating,
answer_rating: newRating,
})
}

Expand Down

0 comments on commit f111ceb

Please sign in to comment.