Fix followers request
This commit is contained in:
parent
50d16319c9
commit
7843487b76
@ -17,9 +17,10 @@ export const FollowerCollection: FC = () => {
|
|||||||
try {
|
try {
|
||||||
const response = await fetch(`${ENDPOINT}?page=${page}`);
|
const response = await fetch(`${ENDPOINT}?page=${page}`);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
const { results, total: totalResults } = data;
|
||||||
|
|
||||||
setFollowers(data.response);
|
setFollowers(results);
|
||||||
setTotal(data.total);
|
setTotal(totalResults);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user