Skip to content

feat(user-management): implemented getting user id to view single user - #124

Open
panckeyk wants to merge 1 commit into
mainfrom
feat/get-user-id
Open

panckeyk wants to merge 1 commit into
mainfrom
feat/get-user-id

Conversation

@panckeyk

Copy link
Copy Markdown
Contributor

Ticket

Description

Added

  • API hook for fetching single user (get-user.ts)
    • getUser(userId) - fetch single user by ID
    • getUserQueryOptions(userId) - query options factory
    • useUser({ userId, queryConfig }) - React Query hook
    • Query key: ["user", userId]

Modified

  • $userId.tsx - User detail page
    • Replaced mock data with real API call
    • Added loading state with spinner
    • Added user not found error handling
    • Proper vertical centering with flex-1
    • Uses backend field names (first_name, last_name)

Technical Details

  • Uses backend endpoint: GET /api/users/{user_id}/
  • Query key structure: ["user", userId] for single resource
  • No keepPreviousData (not needed for single resource)
  • Loading and error states use flex-1 for full viewport centering

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Chore
  • Refactor
  • Documentation

Image Change

Copilot AI balanced review requested due to automatic review settings November 29, 2026 18:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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.

2 participants