From the course: Master React 19, Build Ecommerce Solutions, and Prepare for Interviews with TypeScript, Next.js, and Remix

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Creating OTP verification card

Creating OTP verification card

Now, let's create a card for the OTP verification. For that, I will create another component file called otp-verification.jsx and inside it let's create the basic component with the name otp-verification and right now we won't return anything inside it. Now since the user interface is mostly the same as the previous e-mail verification component, I will simply copy the existing code from there and paste it inside this new OTP verification component. Now let's make a few changes to fit the OTP use case. First I will change the title from e-mail verification to verify your e-mail. Then I will update the label to verification code and inside the input tag I will change the type to number because we are expecting a numeric OTP. Also I will add a placeholder text that says enter six digit code. Finally I will update the button text to verify code. Once this is done, I will go back to the app.jsx file and inside the route for slash OTP verification, instead of rendering the plain text, now…

Contents