Skip to content

Commit

Permalink
Add search for user #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Scobiform committed Apr 19, 2024
1 parent 3187609 commit e4c0054
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@
container.appendChild(div);
});
}

async function loadGraph(userId) {
// Fetch followers and followings
const followers = await fetchAllItems(userId, 'followers', apiBaseUrl);
const followings = await fetchAllItems(userId, 'following', apiBaseUrl);
// Generate graph data
graphData = generateGraphData(userId, userName, userAvatar, followers, followings);
// Calculate the number of connections for each node
calculateNodeConnections(graphData.nodes, graphData.links);
window.graph = initGraph(graphData);
}

</script>

Expand Down

0 comments on commit e4c0054

Please sign in to comment.