Skip to content

feat: share UserProfileContainer between /mypage and /users/:id - #469

Merged
zigzagdev merged 5 commits into
feat/user-loginfrom
feat/mypage-shares-user-profile-container
Jul 28, 2026
Merged

zigzagdev merged 5 commits into
feat/user-loginfrom
feat/mypage-shares-user-profile-container

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

Summary

  • Extract UserProfileContainer (accepts id: number as a prop): owns the get/update/delete hooks, immediate-reflection state, and renders UserProfileView — this is the shared implementation
  • UserGetContainer (/users/:id) becomes a thin wrapper: reads id from the route param, passes it through
  • MyPageContainer (/mypage) becomes a thin wrapper: reads id from useAuth().user.id (the authenticated user's own id), passes it through
  • No URL redirect — /mypage stays /mypage, it just renders the same component tree as viewing your own /users/:id
  • Removes the standalone logout button that was on the /mypage placeholder (tracked separately, not re-added here)
  • Tests reorganized to match: detailed behavior tests moved to user-profile-container.test.tsx; user-get-container.test.tsx and the new mypage-container.test.tsx only verify each wrapper passes the right id through

Related

Closes #468

Test plan

  • npx tsc --noEmit
  • npx jest (206 tests)
  • npm run format:check
  • npm run build

@zigzagdev zigzagdev self-assigned this Jul 28, 2026
@zigzagdev zigzagdev linked an issue Jul 28, 2026 that may be closed by this pull request
2 tasks

@zigzagdev zigzagdev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

OK

@zigzagdev
zigzagdev merged commit cc046d1 into feat/user-login Jul 28, 2026
1 check passed
@zigzagdev
zigzagdev deleted the feat/mypage-shares-user-profile-container branch July 28, 2026 11:18
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.

feat: /mypageを/users/:idと同じUserProfileContainerで表示する

1 participant