summaryrefslogtreecommitdiff
path: root/client/src/context/User.js
diff options
context:
space:
mode:
authorBlaster4385 <[email protected]>2022-08-18 21:05:35 +0530
committerBlaster4385 <[email protected]>2022-08-18 21:05:35 +0530
commit945a16740a36b616f7f2154ffe544f2d2fdbfabd (patch)
tree6b9a140c5ac8b9d2cc35ff554f2ac2f0e3218245 /client/src/context/User.js
parent1d0a79ee10a456d9c970713f2952c3319cac4f8a (diff)
This is what happens when you hard code 10+ validators
Diffstat (limited to 'client/src/context/User.js')
-rw-r--r--client/src/context/User.js52
1 files changed, 50 insertions, 2 deletions
diff --git a/client/src/context/User.js b/client/src/context/User.js
index b3b42e5..a3a883e 100644
--- a/client/src/context/User.js
+++ b/client/src/context/User.js
@@ -4,8 +4,56 @@ export const UserContext = createContext()
export const Context = ({ children }) => {
const [aadhaarNumber, setAadhaarNumber] = useState(null)
- const [userData, setUserData] = useState({})
- const [oriUserData, setOriUserData] = useState({})
+ const [userData, setUserData] = useState({
+ indianResident: '',
+ name: '',
+ gender: '',
+ dob: new Date().toISOString().slice(0, 10),
+ mobile: '',
+ email: '',
+ address: {
+ houseNo: '',
+ street: '',
+ locality: '',
+ landmark: '',
+ village: '',
+ district: {},
+ state: {},
+ postOffice: '',
+ pincode: ''
+ },
+ photo: '',
+ documents: {
+ POI: '',
+ POA: '',
+ DOB: ''
+ }
+ })
+ const [oriUserData, setOriUserData] = useState({
+ indianResident: '',
+ name: '',
+ gender: '',
+ dob: new Date().toISOString().slice(0, 10),
+ mobile: '',
+ email: '',
+ address: {
+ houseNo: '',
+ street: '',
+ locality: '',
+ landmark: '',
+ village: '',
+ district: {},
+ state: {},
+ postOffice: '',
+ pincode: ''
+ },
+ photo: '',
+ documents: {
+ POI: '',
+ POA: '',
+ DOB: ''
+ }
+ })
const initialUser = {
aadhaarNumber,