diff options
author | Rohan Raj Gupta <[email protected]> | 2022-08-19 00:09:27 +0530 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-19 00:09:27 +0530 |
commit | a9ed2c9daa5a3e065401996daf922f59de7f0101 (patch) | |
tree | 4a30f638243ea220f670a16a42f2dc61779bda32 /client/src/context | |
parent | 6c924aef55707885cbbf9af8348564526ac146ee (diff) | |
parent | a06eec4ebb81ba77d4a8b03372a6312ffa5b2aa0 (diff) |
Merge pull request #8 from Blaster4385/develop
moved to context api for enrollment and minor fixes
Diffstat (limited to 'client/src/context')
-rw-r--r-- | client/src/context/User.js | 52 |
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, |