api
https://newstaging.vidalhealth.com:7743/media/health_tools/nwTHGmwk6N/blob
c9492dee63d017eaa6ef28165519bdecc3cb5d28
import CircularProgress from '@mui/material/CircularProgress';
const [loading,setLoading] = useState(true)
const wellnessEcardDetailsAsync = async () => {
try {
let response = await fetch(Variables.get_Base_Url()+'/api/hospital-app/discount_card/wellness_ecard/', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Token ' + localStorage.getItem('token'),
},
body: JSON.stringify({"patient_slug":localStorage.getItem('patient_slug')})
});
let json = await response.json();
setLoading(false);
console.log(json)
if(json.SUCCESS){
setDetails(json.ecards_list);
}
else{
setLoading(false);
}
} catch (error) {
console.error(error);
}
finally{
setLoading(false);
}
};
Comments
Post a Comment