diff --git a/src/components/Registration.css b/src/components/Registration.css new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Registration.js b/src/components/Registration.js new file mode 100644 index 0000000..040cbce --- /dev/null +++ b/src/components/Registration.js @@ -0,0 +1,64 @@ +import React, { useState } from 'react'; +import moment from 'moment'; +import axios from 'axios'; + +import './ExportData.css'; + +function Registration() { + const [userId, setUserId] = useState("2808202300103ROOBHO"); + const [counter, setCounter] = useState(0); + + const createUser = () => { + const id = moment().unix() + counter + "ROOBHO"; + setCounter(counter + 1); + axios({ + method: 'post', + url: "https://asia-south1-hpos-af3cc.cloudfunctions.net/registerUser", + data: { + "_id": id, + "aadharId": "2808202300001", + "abhaId": "12434949797979", + "birthYear": "2000", + "bloodGroup": "", + "careOf": "", + "caste": "", + "city": "Bengaluru", + "district": "Bengaluru", + "gender": "Male", + "house": "42", + "maritalStatus": "Single", + "name": "Web", + "phoneNumber": "9123456789", + "pinCode": "560060", + "registeredBy": "admin", + "registrationCenterName": "SMI", + "sickleCellHistory": null, + "state": "Karnataka", + "subCaste": "", + "testStatus": false, + "underMedication": false, + "underTransfusion": false, + "userImageURL": "https://hpos-prod.web.app/logo.png" + }, + withCredentials: false, + secure: false, + headers: { + "Content-Type": "application/json", + "x-client": "e16a1bd15af2ee640f5a7a18c8d8333f5f01f7c66e003bbc21ee52870f1bce27", + }, + }) + .then(response => response.data) + .then((data) => { + console.log(data); + }); + } + + return ( +