We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2233319 commit 6e0a044Copy full SHA for 6e0a044
scripts/src/fetchFollowers.js
@@ -42,18 +42,18 @@ const getLatestFollowers = async () => {
42
const formattedFollowers = followers.map((follower) => ({
43
profileUrl: follower.html_url,
44
picUrl: follower.avatar_url,
45
+ followedAt: follower.created_at,
46
}));
47
48
formattedFollowers.sort((a, b) => {
- return a.profileUrl.localeCompare(b.profileUrl);
49
+ return new Date(a.followedAt) - new Date(b.followedAt);
50
});
51
52
return formattedFollowers;
53
} catch (error) {
54
console.error("Error fetching followers:", error.message);
55
}
56
};
-
57
export async function handleFetchFollowers() {
58
const followers = await getLatestFollowers();
59
const followersLength = followers.length;
0 commit comments