Skip to content

Wire up Profile page to real backend API and contract data #249

@Anuoluwapo25

Description

@Anuoluwapo25

Description

src/pages/Profile.tsx displays static or mock user data. It should show a learner's real enrolled courses, completed milestones, earned LRN tokens, and ScholarNFT credentials.

What Needs to Be Done

  1. Fetch enrolled courses from GET /api/courses?learner={address}
  2. Fetch milestone statuses from CourseMilestone contract or backend
  3. Display real LRN balance from useLearnToken() hook
  4. Display ScholarNFT credentials (if any) from ScholarNFT contract
  5. Show empty states when user has no activity

Acceptance Criteria

  • Page shows real data when wallet is connected
  • Loading skeletons shown while fetching
  • Error state handled if API/contract calls fail
  • Empty state shown for new users with no activity

Files Affected

  • src/pages/Profile.tsx
  • src/hooks/useProfile.ts (create if needed)

Labels

frontend, integration, help wanted, Stellar Wave

Metadata

Metadata

Assignees

Labels

frontendReact/TypeScript UI workhelp wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions