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
Add expiry message for email change confirm #439
Conversation
This pull request is being automatically deployed with Vercel (learn more). egghead-io-nextjs – ./🔍 Inspect: https://vercel.com/eggheadio/egghead-io-nextjs/1sdall3t6 egghead-next-storybook – ./🔍 Inspect: https://vercel.com/eggheadio/egghead-next-storybook/o02t9qvea |
@@ -87,7 +87,6 @@ const CopyToClipboard: FunctionComponent<{ | |||
<IconLink className="w-5" /> | |||
<span>Copy link</span> | |||
</button> | |||
<Toaster position="bottom-center" /> |
There was a problem hiding this comment.
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
.
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: '❌'}, | ||
) |
There was a problem hiding this comment.
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.
2f2fd10
to
4faa23c
Compare
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