move request to effect

This commit is contained in:
Владислав Чикалкин 2020-09-23 17:09:42 +03:00
parent b0473e9686
commit 49829dac92

View File

@ -18,19 +18,19 @@ const Calculation = () => {
.catch(err => {
throw err;
});
}, []);
CalculationService.getEntityOptions({
entityName: 'lead',
fields: undefined,
where: undefined,
})
.then(leadOptions => {
calculationStore.applyOptions({ selectLead: leadOptions });
CalculationService.getEntityOptions({
entityName: 'lead',
fields: undefined,
where: undefined,
})
.catch(err => {
throw err;
});
.then(leadOptions => {
calculationStore.applyOptions({ selectLead: leadOptions });
})
.catch(err => {
throw err;
});
}, []);
return (
<Box mx={['0', '1%', '1%', '1.5%', '2%', '10%']}>