diff --git a/apps/OpenSign/src/components/dashboard/DashboardCard.js b/apps/OpenSign/src/components/dashboard/DashboardCard.js index 48a9f3bda..f8017ac91 100644 --- a/apps/OpenSign/src/components/dashboard/DashboardCard.js +++ b/apps/OpenSign/src/components/dashboard/DashboardCard.js @@ -261,21 +261,14 @@ const DashboardCard = (props) => { } } body = str; - await axios - .post(url, body, { headers: headers }) - .then((response) => { - try { - if (response.data.result.length > 0) { - setresponse(response.data.result[0][props.FilterData.key]); - setLoading(false); - } else { - setresponse("0"); - setLoading(false); - } - } catch (error) { - setLoading(false); - } - }); + const response = await axios.post(url, body, { headers: headers }); + if (response.data.result.length > 0) { + setresponse(response.data.result[0][props.FilterData.key]); + setLoading(false); + } else { + setresponse("0"); + setLoading(false); + } } catch (error) { setLoading(false); } @@ -338,7 +331,7 @@ const DashboardCard = (props) => { }`} >