Repository navigation
Conversation
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add user details page for tech_query
Add user profile detail page (新增用户详情页)
Nov 8, 2025
TechQuery
requested changes
Nov 8, 2025
…tly, remove user index - Revert components/Git/Issue/Card.tsx to original synchronous markdown rendering - Delete package-lock.json and add to .gitignore (use pnpm instead) - Replace mock user data with direct API call to freeCodeCamp - Remove pages/user/index.tsx (not needed currently) Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
- Update property names to match FCCUserProfile type (bio→about, avatar→picture, linkedin→linkedIn) - Use usernameDisplay field for display name - Fix completedChallenges to use array length - Remove fields not in type (twitter, currentStreak, longestStreak, certifications) - Add error handling to return 404 when API fails - Simplify stats display to show points and completed challenges count Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Contributor
Author
Updated in commit abaaa35. The UI now correctly uses the Property changes:
Removed fields not in the type:
Error handling: Added try-catch to return 404 when API fails (since freeCodeCamp API is not accessible outside their ecosystem). The page now displays: user picture, name/username, location, about text, social links (GitHub, LinkedIn, Website), points, and completed challenges count. |
[add] GitHub OAuth middleware & API proxy
TechQuery
force-pushed
the
copilot/add-user-details-page
branch
from
November 10, 2025 11:43
36c8597 to
317558d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist(清单):
Closes #56
Changes
Implements user profile page for freeCodeCamp users as referenced in the issue:
https://api.freecodecamp.org/users/get-public-profile?username=tech_queryhttps://www.freecodecamp.org/tech_queryImplementation
New Route:
/user/[username]- Dynamic user profile (e.g.,/user/tech_query)New Files:
pages/api/user.ts- API client with proper TypeScript types (FCCUserProfile) that fetches user data directly from freeCodeCamp API using koajaxpages/user/[username].tsx- Server-side rendered profile page with proper type safetyProfile Features:
usernameDisplayfallback), location, aboutAPI Integration
The implementation calls
https://api.freecodecamp.org/users/get-public-profile?username={username}using koajax HTTP client. The API is not accessible outside the freeCodeCamp ecosystem (as noted in the issue), so the page returns 404 until deployed within the freeCodeCamp infrastructure.Type Safety: The UI correctly uses the
FCCUserProfiletype with proper field mappings:picturefield for avataraboutfield for bio textlinkedIn(correct camelCase) for LinkedIn linkusernameDisplayfor display namecompletedChallengesas an array and uses.lengthfor countProject Configuration
Switched to pnpm for package management
Added
package-lock.jsonto.gitignoreFixes 新增用户详情页 #56
Original prompt
Human changes
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.