Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add expiry message for email change confirm #439

Merged
merged 3 commits into from Feb 15, 2021

Conversation

jbranchaud
Copy link
Collaborator

We had someone revisiting a used link and trying to re-confirm several times. This message should help them know they've already used it (or that it has expired). It uses the react-hot-toast package.

CleanShot.2021-02-15.at.11.31.09.mp4

@vercel
Copy link

vercel bot commented Feb 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

egghead-io-nextjs – ./

🔍 Inspect: https://vercel.com/eggheadio/egghead-io-nextjs/1sdall3t6
✅ Preview: https://egghead-io-nex-git-jb-add-expiry-message-for-email-chang-ac9ddb.eggheadio1.vercel.app

egghead-next-storybook – ./

🔍 Inspect: https://vercel.com/eggheadio/egghead-next-storybook/o02t9qvea
✅ Preview: https://egghead-next-s-git-jb-add-expiry-message-for-email-chang-5cd952.eggheadio1.vercel.app

@@ -87,7 +87,6 @@ const CopyToClipboard: FunctionComponent<{
<IconLink className="w-5" />
<span>Copy link</span>
</button>
<Toaster position="bottom-center" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving this to a shared location in _app.tsx.

Comment on lines +46 to +55
toast.success(
"You've successfully updated your email address",
)
router.replace('/user')
}
} catch (e) {
toast.error(
'This link for changing your email has been used or has expired. Feel free to request a new link.',
{duration: 6000, icon: '❌'},
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduce success and error toasts for Email Change Confirmation to make it clearer that it succeeded or failed.

@joelhooks
Copy link
Contributor

suggestion(follow-up): I think this message should contain more details about what is happening including the email addresses that are being changed.

image

@kodiakhq kodiakhq bot merged commit bdff689 into main Feb 15, 2021
@kodiakhq kodiakhq bot deleted the jb/add-expiry-message-for-email-change-confirm branch February 15, 2021 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants