react calling async function in useeffect