From 945a16740a36b616f7f2154ffe544f2d2fdbfabd Mon Sep 17 00:00:00 2001 From: Blaster4385 Date: Thu, 18 Aug 2022 21:05:35 +0530 Subject: This is what happens when you hard code 10+ validators --- client/src/context/User.js | 52 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) (limited to 'client/src/context') 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, -- cgit