There is a problem with getting API using useEffect