feat: implement interactive knowledge graph visualization and AI-driven graph optimization dashboard
This commit is contained in:
@@ -17,7 +17,13 @@ const Dashboard = () => {
|
||||
const learnDone = storage.get(`user:${currentUser?.id}:week:${weekNumber}:learn_done`, false);
|
||||
const testResult = getTestResult(currentUser?.id, weekNumber);
|
||||
|
||||
const leaderboard = storage.get('leaderboard:current', []).sort((a, b) => b.points - a.points);
|
||||
const allUsers = storage.get('users:registry', []);
|
||||
const nonAdminIds = allUsers.filter(u => u.role !== 'admin').map(u => u.id);
|
||||
|
||||
const leaderboard = storage.get('leaderboard:current', [])
|
||||
.filter(u => nonAdminIds.includes(u.userId))
|
||||
.sort((a, b) => b.points - a.points);
|
||||
|
||||
const top3 = leaderboard.slice(0, 3);
|
||||
const myRank = leaderboard.findIndex(u => u.userId === currentUser?.id) + 1;
|
||||
const myPoints = leaderboard.find(u => u.userId === currentUser?.id)?.points || 0;
|
||||
|
||||
Reference in New Issue
Block a user