Fix followers request

This commit is contained in:
Gabe Kangas 2022-10-09 18:52:41 -07:00
parent 50d16319c9
commit 7843487b76
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA

View File

@ -17,9 +17,10 @@ export const FollowerCollection: FC = () => {
try {
const response = await fetch(`${ENDPOINT}?page=${page}`);
const data = await response.json();
const { results, total: totalResults } = data;
setFollowers(data.response);
setTotal(data.total);
setFollowers(results);
setTotal(totalResults);
} catch (error) {
console.error(error);
}