blob: afa3bbde843c8ecd6246b299c39e76e07f5134ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
import React, { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import Header from '../../components/Header/Header'
import styles from './Update.module.css'
import Input from '../../components/Input/Input'
// import { useQuery } from 'react-query'
import { Grid, Button } from '@mui/material'
// import { getUserByAadhaar } from '../../services/apiservice'
// import { validAadhaar } from '../../components/RegEx/RegEx'
const Update = () => {
const [aadhaarNumber, setAadhaarNumber] = useState()
const navigate = useNavigate()
// console.log(aadhaarNumber)
// const user = useQuery(['user', aadhaarNumber], () =>
// getUserByAadhaar(aadhaarNumber)
// )
// console.log(user.data.data)
return (
<>
<Header subheading="Update" />
<div className={styles.subheading__container}>
<h3 className={styles.subheading}> Provide Aadhaar Number (UID): </h3>
<Input
type="text"
id="aadhaarNumber"
value={aadhaarNumber}
onChange={(e) => setAadhaarNumber(e.target.value)}
placeholder="Enter your Aadhaar Number"
required
/>
<Grid container columnSpacing={10} justifyContent="center">
<Grid item>
<Button
color="primary"
size="large"
type="submit"
variant="contained"
>
Send OTP
</Button>
</Grid>
</Grid>
</div>
<div className={styles.subheading__container}>
<h3 className={styles.subheading}> Enter OTP </h3>
<Input
type="text"
id="aadhaarNumber"
placeholder="Enter One Time Password"
/>
<Grid container columnSpacing={10} justifyContent="center">
<Grid item>
<Button
color="primary"
size="large"
type="submit"
variant="contained"
onClick={() => navigate('/update/select-update')}
>
Verify OTP
</Button>
</Grid>
</Grid>
</div>
</>
)
}
export default Update
|