From 6e3eaf3d9a8d2b5783fceb14850dce3b7979577c Mon Sep 17 00:00:00 2001 From: Li Yi Yu Date: Tue, 24 Oct 2023 21:42:46 -0400 Subject: [PATCH] fix(surveys): update subscribe link (#18173) subscribe link out --- .../components/PayGateMini/PayGateMini.tsx | 2 +- frontend/src/scenes/surveys/SurveyEdit.tsx | 56 +++++++++++-------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/frontend/src/lib/components/PayGateMini/PayGateMini.tsx b/frontend/src/lib/components/PayGateMini/PayGateMini.tsx index 3431660481dcc..477fda2461dca 100644 --- a/frontend/src/lib/components/PayGateMini/PayGateMini.tsx +++ b/frontend/src/lib/components/PayGateMini/PayGateMini.tsx @@ -145,7 +145,7 @@ export function PayGateMini({ center > {gateVariant === 'add-card' - ? 'Upgrade now' + ? 'Subscribe now' : gateVariant === 'contact-sales' ? 'Contact sales' : 'Subscribe'} diff --git a/frontend/src/scenes/surveys/SurveyEdit.tsx b/frontend/src/scenes/surveys/SurveyEdit.tsx index b563ec616a38b..7759350e4f9ec 100644 --- a/frontend/src/scenes/surveys/SurveyEdit.tsx +++ b/frontend/src/scenes/surveys/SurveyEdit.tsx @@ -12,6 +12,7 @@ import { LemonSelect, LemonTabs, LemonTextArea, + Link, } from '@posthog/lemon-ui' import { Field, PureField } from 'lib/forms/Field' import { @@ -591,30 +592,37 @@ export default function SurveyEdit(): JSX.Element { />
{featureFlags[FEATURE_FLAGS.SURVEYS_MULTIPLE_QUESTIONS] && ( - } - sideIcon={ - surveysMultipleQuestionsAvailable ? null : ( - - ) - } - disabledReason={ - surveysMultipleQuestionsAvailable - ? null - : 'Subscribe for multiple question surveys' - } - onClick={() => { - setSurveyValue('questions', [ - ...survey.questions, - { ...defaultSurveyFieldValues.open.questions[0] }, - ]) - setSelectedQuestion(survey.questions.length) - }} - > - Add question - +
+ } + sideIcon={ + surveysMultipleQuestionsAvailable ? null : ( + + ) + } + disabledReason={ + surveysMultipleQuestionsAvailable + ? null + : 'Subscribe to surveys for multiple questions' + } + onClick={() => { + setSurveyValue('questions', [ + ...survey.questions, + { ...defaultSurveyFieldValues.open.questions[0] }, + ]) + setSelectedQuestion(survey.questions.length) + }} + > + Add question + + {!surveysMultipleQuestionsAvailable && ( + + Subscribe + + )} +
)} {!survey.appearance.displayThankYouMessage && (