How to fix Cannot use fetch in a non-async function in React | DevErrors