Skip to content

Commit 9485c5a

Browse files
committed
issue with otp
1 parent a5fea6b commit 9485c5a

File tree

6 files changed

+409
-142
lines changed

6 files changed

+409
-142
lines changed

components/Registration/Registration.tsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,24 @@ const Registration: NextPage<Props> = ({}) => {
7272
const handleClose = () => {
7373
setOpen(false)
7474
}
75-
const handleResendOTP = () => {
76-
// Handle OTP resend logic here
77-
}
75+
// const handleResendOTP = () => {
76+
// const data = {
77+
// name: formdata.fullName,
78+
// email: `${formdata.rollNumber}@iitdh.ac.in`,
79+
// userHandle: formdata.userHandle,
80+
// }
81+
82+
// axios
83+
// .post('/api/email/sendEmail', data)
84+
// .then(response => {
85+
// // Handle the successful response from the server
86+
// console.log('Server Response:', response.data)
87+
// })
88+
// .catch(error => {
89+
// // Handle any errors that occurred during the request
90+
// console.error('Error:', error)
91+
// })
92+
// }
7893

7994
const handleSubmitOTP = () => {
8095
axios
@@ -139,7 +154,7 @@ const Registration: NextPage<Props> = ({}) => {
139154
maxLength={4}
140155
/>
141156
<button onClick={handleSubmitOTP}>Submit</button>
142-
<button onClick={handleResendOTP}>Resend OTP</button>
157+
{/* <button onClick={handleResendOTP}>Resend OTP</button> */}
143158
</div>
144159
</Modal>
145160

@@ -160,6 +175,7 @@ const Registration: NextPage<Props> = ({}) => {
160175
title='Codeforces'
161176
inputs={inputs_cf}
162177
handleChangeInput={handleChangeInput_cf}
178+
handleOpen={handleOpen}
163179
type={0}
164180
/>
165181
</div>
@@ -170,6 +186,7 @@ const Registration: NextPage<Props> = ({}) => {
170186
title='LeetCode'
171187
inputs={inputs_lt}
172188
handleChangeInput={handleChangeInput_lt}
189+
handleOpen={handleOpen}
173190
type={1}
174191
/>
175192
</div>

0 commit comments

Comments
 (0)