From the course: React: Authentication (2021)

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Handling successful and failed verifications

Handling successful and failed verifications - React.js Tutorial

From the course: React: Authentication (2021)

Handling successful and failed verifications

- [Instructor] Okay. So we've created our email verification landing page. The other things that we need to implement are going to be the email verification success and email verification fail components. These are going to actually be very simple. We'll start off with the success one. So we're going to want to import the useHistory hook. We'll be using that in a button on this page, react router dom. And then we'll say export const EmailVerificationSuccess. We're going to get our history equals useHistory. And from here, we're going to return the body of the component. For styling purposes, we'll have a div with the className of content container. Inside here, we'll say something like Success. Under that, we'll have just a brief message saying something like Thanks for verifying your email, now you can use all the app's features. And then under that, we're going to have a button that will allow the user to go back to the…

Contents