Skip to content

Commit

Permalink
issue with otp
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaSurya-27 committed Oct 11, 2023
1 parent a5fea6b commit 9485c5a
Show file tree
Hide file tree
Showing 6 changed files with 409 additions and 142 deletions.
25 changes: 21 additions & 4 deletions components/Registration/Registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,24 @@ const Registration: NextPage<Props> = ({}) => {
const handleClose = () => {
setOpen(false)
}
const handleResendOTP = () => {
// Handle OTP resend logic here
}
// const handleResendOTP = () => {
// const data = {
// name: formdata.fullName,
// email: `${formdata.rollNumber}@iitdh.ac.in`,
// userHandle: formdata.userHandle,
// }

// axios
// .post('/api/email/sendEmail', data)
// .then(response => {
// // Handle the successful response from the server
// console.log('Server Response:', response.data)
// })
// .catch(error => {
// // Handle any errors that occurred during the request
// console.error('Error:', error)
// })
// }

const handleSubmitOTP = () => {
axios
Expand Down Expand Up @@ -139,7 +154,7 @@ const Registration: NextPage<Props> = ({}) => {
maxLength={4}
/>
<button onClick={handleSubmitOTP}>Submit</button>
<button onClick={handleResendOTP}>Resend OTP</button>
{/* <button onClick={handleResendOTP}>Resend OTP</button> */}
</div>
</Modal>

Expand All @@ -160,6 +175,7 @@ const Registration: NextPage<Props> = ({}) => {
title='Codeforces'
inputs={inputs_cf}
handleChangeInput={handleChangeInput_cf}
handleOpen={handleOpen}
type={0}
/>
</div>
Expand All @@ -170,6 +186,7 @@ const Registration: NextPage<Props> = ({}) => {
title='LeetCode'
inputs={inputs_lt}
handleChangeInput={handleChangeInput_lt}
handleOpen={handleOpen}
type={1}
/>
</div>
Expand Down
Loading

0 comments on commit 9485c5a

Please sign in to comment.