I think it's not good to have an await for async operations on useEffect like you dit it. May be wrap it in an async function put inside the useEffect
I think you could avoid to mess class with function even if it's possible. since the last release of React, it's recommended to use functional component.
thanks