Skip to content

fix: render authenticated user on profile page instead of hardcoded John Doe - #1099

Open
Godfrey-Delight wants to merge 2 commits into
rinafcode:mainfrom
Godfrey-Delight:fix/profile-page-authenticated-user
Open

fix: render authenticated user on profile page instead of hardcoded John Doe#1099
Godfrey-Delight wants to merge 2 commits into
rinafcode:mainfrom
Godfrey-Delight:fix/profile-page-authenticated-user

Conversation

@Godfrey-Delight

Copy link
Copy Markdown

Description

Adds getAuthenticatedUserProfile() in userProfile.ts to verify JWT tokens from session cookies/Authorization headers and look up the corresponding database user, with getInitials() and formatNameFromEmail() helpers. Adds GET/PUT endpoints at /api/user/profile and a useUserProfile client hook for fetching and updating profile data. Wires page.tsx (and generateMetadata()) to fetch the authenticated user server-side and pass it down, and updates ProfileTabs.tsx/ProfileInfoPanel.tsx to consume initialUser/useUserProfile() instead of the hardcoded "John Doe" data, replacing the static import in the process.

Related Issue

Closes #935

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

…ohn Doe

Adds getAuthenticatedUserProfile() in userProfile.ts to verify JWT tokens from session cookies/Authorization headers and look up the corresponding database user, with getInitials() and formatNameFromEmail() helpers. Adds GET/PUT endpoints at /api/user/profile and a useUserProfile client hook for fetching and updating profile data. Wires page.tsx (and generateMetadata()) to fetch the authenticated user server-side and pass it down, and updates ProfileTabs.tsx/ProfileInfoPanel.tsx to consume initialUser/useUserProfile() instead of the hardcoded "John Doe" data, replacing the static import in the process.
Closes rinafcode#935
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Godfrey-Delight Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Well done on the job done so far!
kindly fix workflow to pass

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Kindly fix your failing workflow to pass

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Render the authenticated user on the profile page instead of hardcoded John Doe

2 participants