Skip to content

[Bug] Dashboard stats are hardcoded β€” not fetched from APIΒ #67

@karastoyanov

Description

@karastoyanov

πŸ› Bug Description

The Dashboard displays XP Points (1,200), Completed challenges (15), and Rank (24) as hardcoded strings. The GET /api/users/<user_id> endpoint already returns real xp, level, rank, and level_percentage data, but Dashboard never calls it.

πŸ“‹ Steps to Reproduce

  1. Log in and navigate to /dashboard
  2. Complete a quest (XP should increase)
  3. Observe that the dashboard stats remain 1,200 XP / 15 Completed / 24 Rank

🎯 Expected Behavior

Stats reflect the authenticated user's real data from GET /api/users/<user_id>.

πŸ“Έ Actual Behavior

Hardcoded values in Dashboard.jsx:119-124 and the XP progress bar at Dashboard.jsx:229.

🌍 Environment

All environments.

πŸ“Ž Additional Context

The /api/users/<user_id> route in users_routes.py:27 already returns xp, level, rank, level_percentage. The authUser.id is available from useAuth().

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions