Skip to content

fix: Replace hardcoded username "Anshi" and static stats with real Supabase session data#84

Merged
Shriii19 merged 1 commit into
Shriii19:masterfrom
Ananya-CM:fix/dashboard-hardcoded-user-stats
May 21, 2026
Merged

fix: Replace hardcoded username "Anshi" and static stats with real Supabase session data#84
Shriii19 merged 1 commit into
Shriii19:masterfrom
Ananya-CM:fix/dashboard-hardcoded-user-stats

Conversation

@Ananya-CM
Copy link
Copy Markdown
Contributor

Summary

Fixed the Dashboard page which was showing hardcoded
username "Anshi" and fake static stats to every user
regardless of who was actually logged in.

Changes Made

Only frontend/app/dashboard/page.tsx was modified:

  1. Replaced hardcoded user object with dynamic
    state that fetches real name from Supabase session:

    • Uses session.user.user_metadata?.full_name
    • Falls back to session.user.email
    • Falls back to "User" if nothing found
  2. Replaced hardcoded stats values (+18%, 24, 2)
    with "—" placeholder indicating data is not
    yet integrated with real backend

Before

  • Every user saw "Welcome back, Anshi 👋"
  • Stats showed same fake numbers for everyone

After

  • ✅ Shows real logged-in user's name
  • ✅ Stats show "—" as honest placeholder
  • ✅ Connected to real Supabase auth session

Screenshots

Screenshot 2026-05-21 152053

Files Changed

  • frontend/app/dashboard/page.tsx — only file modified

Issue

Closes #82

nsoc26

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

@Ananya-CM is attempting to deploy a commit to the shreemp194-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

👋 Thank you for opening this pull request! I will review your changes and assist you soon.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flow-forge Ready Ready Preview, Comment May 21, 2026 4:29pm

@Shriii19 Shriii19 merged commit 428fd80 into Shriii19:master May 21, 2026
7 checks passed
@Shriii19
Copy link
Copy Markdown
Owner

@Ananya-CM well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Dashboard shows hardcoded username "Anshi" and static stats instead of real logged-in user data

2 participants