From 07df7ac182c576440c5b063133a5a0b99a9e05e1 Mon Sep 17 00:00:00 2001 From: Tessa Thornton Date: Fri, 23 Aug 2019 14:16:08 -0400 Subject: [PATCH] show email verification resend (#2492) * always show users with unverified email address the prompt and resend option * udpate snaps * update snap --- .../ChangeEmail/ChangeEmailContainer.tsx | 4 +- .../__snapshots__/settings.spec.tsx.snap | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/core/client/stream/tabs/Profile/ChangeEmail/ChangeEmailContainer.tsx b/src/core/client/stream/tabs/Profile/ChangeEmail/ChangeEmailContainer.tsx index d3f6965be..ea2bb4cbc 100644 --- a/src/core/client/stream/tabs/Profile/ChangeEmail/ChangeEmailContainer.tsx +++ b/src/core/client/stream/tabs/Profile/ChangeEmail/ChangeEmailContainer.tsx @@ -70,7 +70,6 @@ const changeEmailContainer: FunctionComponent = ({ const updateEmail = useMutation(UpdateEmailMutation); const [showEditForm, setShowEditForm] = useState(false); - const [emailUpdated, setEmailUpdated] = useState(false); const [confirmationResent, setConfirmationResent] = useState(false); const makeFetchCall = useFetch(fetcher); const resend = useCallback(async () => { @@ -100,7 +99,6 @@ const changeEmailContainer: FunctionComponent = ({ form.reset(); setShowEditForm(false); - setEmailUpdated(true); return; }, @@ -162,7 +160,7 @@ const changeEmailContainer: FunctionComponent = ({ )} )} - {!viewer.emailVerified && emailUpdated && !showEditForm && ( + {!viewer.emailVerified && !showEditForm && (
diff --git a/src/core/client/stream/test/profile/__snapshots__/settings.spec.tsx.snap b/src/core/client/stream/test/profile/__snapshots__/settings.spec.tsx.snap index 2e7625283..f292c3dfd 100644 --- a/src/core/client/stream/test/profile/__snapshots__/settings.spec.tsx.snap +++ b/src/core/client/stream/test/profile/__snapshots__/settings.spec.tsx.snap @@ -129,6 +129,52 @@ exports[`renders the empty settings pane 1`] = ` Edit
+
+
+
+
+ +
+
+

+ Verify your email address +

+

+ An email has been sent to $email to verify your account. +You must verify your new email address before it can be used for +signing into your account or for email notifications. +

+ +
+
+
+