const handlePersonalInfo = (data: any, e: any) => { e.preventDefault(); console.log('entered info::', data); let hasEmiratesId: boolean; if (selectedOption === 'Yes') hasEmiratesId = true; else hasEmiratesId = false; let isMirrorWill: boolean; if (singleWillCheck) isMirrorWill = false; else isMirrorWill = true; const allData = { ...data, maritalStatusGUID, dateOfBirth, referralQuestionGUID, hasEmiratesId, isMirrorWill, isdCodeGUID1: countryGUID, isdCodeGUID2: countryGUID, nationalityGuid, countryGUID, }; console.log('allData test', allData); axios.post(personalInformationAPI, allData).then((res) => { console.log('res post', res); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter