Skip to content

Commit

Permalink
another round of tweaks to survey
Browse files Browse the repository at this point in the history
  • Loading branch information
Bianca Yang committed Nov 2, 2023
1 parent 447006b commit 6e662e9
Showing 1 changed file with 61 additions and 55 deletions.
116 changes: 61 additions & 55 deletions frontend/src/scenes/billing/UnsubscribeSurveyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,64 +15,70 @@ export const UnsubscribeSurveyModal = ({ product }: { product: BillingProductV2T
onClose={() => {
setSurveyID('')
}}
title={`Let us know why you're unsubscribing from ${product.name}`}
width={'max(40vw)'}
>
<div className="flex flex-col gap-2">
<LemonTextArea
placeholder={'Start typing...'}
value={surveyResponse['$survey_response']}
onChange={(value) => {
setSurveyResponse(value, '$survey_response')
}}
/>
<LemonBanner type="info">
<p>
{'Need to control your costs? '}
<Link
to="https://posthog.com/docs/billing/estimating-usage-costs#how-to-reduce-your-posthog-costs"
target="_blank"
>
Learn about ways to reduce your bill
</Link>
{`${product.type !== 'session_replay' ? ' or ' : ', '}`}
<Link to="mailto:[email protected]?subject=Help%20reducing%20PostHog%20bill" target="_blank">
chat with support
</Link>

{product.type === 'session_replay' && (
<>
{', or '}
<Link
to="mailto:[email protected]?subject=Joining%session%replay%controls%20beta"
target="_blank"
>
join our beta for tuning recording volume with sampling and minimum duration
</Link>
</>
)}
</p>
</LemonBanner>
<div className="flex justify-end gap-8">
<LemonButton
type="tertiary"
status="muted"
onClick={() => {
setSurveyID('')
}}
>
Cancel
</LemonButton>
<LemonButton
type={textAreaNotEmpty ? 'primary' : 'tertiary'}
status={textAreaNotEmpty ? 'primary' : 'muted'}
onClick={() => {
reportSurveySent(surveyID, surveyResponse)
deactivateProduct(product.type)
<div>
<h3 className="mt-2 mb-4">{`Why are you unsubscribing from ${product.name}?`}</h3>
<div className="flex flex-col gap-3.5">
<LemonTextArea
placeholder={'Start typing...'}
value={surveyResponse['$survey_response']}
onChange={(value) => {
setSurveyResponse(value, '$survey_response')
}}
>
Unsubscribe
</LemonButton>
/>
<LemonBanner type="info">
<p>
{'Need to control your costs? Learn about ways to '}
<Link
to="https://posthog.com/docs/billing/estimating-usage-costs#how-to-reduce-your-posthog-costs"
target="_blank"
>
reduce your bill
</Link>
{`${product.type !== 'session_replay' ? ' or ' : ', '}`}
<Link
to="mailto:[email protected]?subject=Help%20reducing%20PostHog%20bill"
target="_blank"
>
chat with support
</Link>

{product.type === 'session_replay' && (
<>
{', or '}
<Link
to="mailto:[email protected]?subject=Joining%session%replay%controls%20beta"
target="_blank"
>
join our beta
</Link>
{' for tuning recording volume with sampling and minimum duration.'}
</>
)}
</p>
</LemonBanner>
<div className="flex justify-end gap-4">
<LemonButton
type="tertiary"
status="muted"
onClick={() => {
setSurveyID('')
}}
>
Cancel
</LemonButton>
<LemonButton
type={textAreaNotEmpty ? 'primary' : 'tertiary'}
status={textAreaNotEmpty ? 'primary' : 'muted'}
onClick={() => {
reportSurveySent(surveyID, surveyResponse)
deactivateProduct(product.type)
}}
>
Unsubscribe
</LemonButton>
</div>
</div>
</div>
</LemonModal>
Expand Down

0 comments on commit 6e662e9

Please sign in to comment.