From 9307505db8a5ef6d7ff79e1940097688d92c49b3 Mon Sep 17 00:00:00 2001 From: Zach Waterfield Date: Thu, 28 Mar 2024 13:47:25 -0400 Subject: [PATCH] Update VerifyEmail.tsx --- .../signup/verify-email/VerifyEmail.tsx | 100 +++++++++--------- 1 file changed, 52 insertions(+), 48 deletions(-) diff --git a/frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.tsx b/frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.tsx index 1e9a239d514d3..81d5231edfdf1 100644 --- a/frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.tsx +++ b/frontend/src/scenes/authentication/signup/verify-email/VerifyEmail.tsx @@ -1,5 +1,4 @@ -import { IconX } from '@posthog/icons' -import { LemonButton, LemonCheckbox } from '@posthog/lemon-ui' +import { LemonButton, LemonCheckbox, LemonModal } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { BridgePage } from 'lib/components/BridgePage/BridgePage' import { HeartHog, MailHog, SurprisedHog } from 'lib/components/hedgehogs' @@ -19,18 +18,16 @@ export const VerifyEmailHelpLinks = (): JSX.Element => { const { requestVerificationLink } = useActions(verifyEmailLogic) const { uuid } = useValues(verifyEmailLogic) const { openSupportForm } = useActions(supportLogic) - const [iNeedHelp, setINeedHelp] = useState(false) const [checkListValues, setCheckListValues] = useState([]) - if (!iNeedHelp) { - return ( - setINeedHelp(true)}> - I need help - - ) - } - - const checklist = ['Checked your spam folder', 'Checked with your IT department (if applicable)'] + const checklist = [ + 'Wait 5 minutes. Sometimes it takes a bit for ISPs to deliver emails.', + 'Check your spam folder', + 'Check any firewalls you may have active', + 'Ask your company IT department to allow any emails from @posthog.com', + "Make sure you can receive other emails to your email address, especially if it's an alias", + 'Channel your inner hedgehog and take another peek at your inbox', + ] const handleChecklistChange = (index: number): void => { const newCheckListValues = [...checkListValues] @@ -41,17 +38,9 @@ export const VerifyEmailHelpLinks = (): JSX.Element => { const allChecked = checklist.every((_, index) => checkListValues[index]) return ( -
- { - setCheckListValues([]) - setINeedHelp(false) - }} - /> +
-

Please confirm you've done the following:

-
+
{checklist.map((item, index) => ( { ))}
- {allChecked && ( -
-

Choose one of the following options:

-
+
+

Choose one of the following options:

+
+ { + openSupportForm({ kind: 'bug', target_area: 'login' }) + }} + > + Contact support + + {uuid && ( { - openSupportForm({ kind: 'bug', target_area: 'login' }) + requestVerificationLink(uuid) }} > - Contact support + Request a new link - {uuid && ( - { - requestVerificationLink(uuid) - }} - > - Request a new link - - )} -
+ )}
- )} +
) } +const GetHelp = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false) + return ( + <> + setIsOpen(true)}> + Get help + + setIsOpen(false)} + title="Get help" + description="Sorry you're having troubles! We're here to help, but first we ask that you check a few things first on your end. Generally any issues with email happen after they leave our hands." + > + + + + ) +} + export function VerifyEmail(): JSX.Element { const { view } = useValues(verifyEmailLogic) @@ -100,19 +108,15 @@ export function VerifyEmail(): JSX.Element {
-
+
{view === 'pending' ? ( <> -

Welcome to PostHog!

Let's verify your email address.

-

- An email has been sent to with a link to verify your email address. If you have not - received the email in a few minutes, please check your spam folder. -

- +

An email has been sent with a link to verify your email address.

+ ) : view === 'verify' ? ( <> @@ -134,7 +138,7 @@ export function VerifyEmail(): JSX.Element {

Seems like that link isn't quite right. Try again?

- + ) : (