title: Not getting returned value from async await function
body: <p>I am getting undefined returned value when I press button.</p>
  <pre><code>&lt;Button btnType=&quot;outline&quot; onClick={LockUnlockAccountHandler}&gt;
       lock client’s account
  &lt;/Button&gt;
  
  const LockUnlockAccountHandler = async () =&gt; {
    const status = await LockUnlockAccount(detailData?.userId, detailData?.blocked ? 'UNLOCK' : 'LOCK');
    console.log(status)
    if(status){
      setDetailData({
        ...detailData,
        blocked: !detailData.blocked
      })
    }
  }
  </code></pre>
  <p>Status value is undefined in above function which should be true or false from below function.</p>
  <pre><code>export async function LockUnlockAccount(clientID, dataVal) {
    
    var config = {
      method: 'post',
      url: endpoint.lockAccount + clientID + &quot;/status&quot;  + endpoint.key,
      headers: { 
        'Content-Type': 'application/x-www-form-urlencoded',
      },
      data : qs.stringify({
        'status': dataVal 
      })
    };
    axios(config)
      .then(function (response) {
        //console.log(JSON.stringify(response));
        if (response.status === 200) {
          toast('succès');
          return true;
        }
        return false;
      })
      .catch(function (error) {
        console.log(error);
        toast('error');
        return false;
      });
  }
  </code></pre>