simpler user components#29063
simpler user components#29063chrisnojima-zoom wants to merge 1 commit intonojima/HOTPOT-next-670-cleanfrom
Conversation
chrisnojima-zoom
commented
Mar 25, 2026
- test
There was a problem hiding this comment.
Pull request overview
Refactors several user profile and teams UI components to simplify props usage, extract helper functions/components, and make state/logic more readable (notably around teams showcase, profile bio/proofs layout, and action button rendering).
Changes:
- Simplified multiple components by destructuring props and extracting helpers (teams showcase, friend tiles, action buttons).
- Restructured the profile screen into smaller subcomponents/helpers (bio/proofs panels, friends section item building).
- Refactored
useUserDatainto smaller pure helpers for base/SBS/Keybase profile state derivation.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| shared/profile/user/teams/teaminfo.tsx | Simplifies TeamInfo by destructuring props and inlining derived strings/handlers. |
| shared/profile/user/teams/index.tsx | Cleans up teams showcase container logic and factors membership calculation into a helper. |
| shared/profile/user/index.tsx | Large refactor splitting profile UI into smaller components and extracting helper functions for friends/sections. |
| shared/profile/user/hooks.tsx | Refactors useUserData into composable helpers for clearer profile state derivation. |
| shared/profile/user/friend.tsx | Simplifies Friend component and extracts follow icon selection logic. |
| shared/profile/user/actions/index.tsx | Extracts action button selection into getButtons and factors dropdown item construction. |
| shared/profile/user/actions/follow-button.tsx | Simplifies FollowButton implementation and hover handling. |
| AGENTS.md | Adds repo note about React Compiler expectations for React code edits. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return styles.typedBackgroundGreen | ||
| case 'blue': | ||
| return styles.typedBackgroundBlue | ||
| default: |
There was a problem hiding this comment.
This switch has an intentional fallthrough from case 'blue' into default, which will be flagged by ESLint's no-fallthrough (the repo extends eslint:recommended). Since BackgroundColorType is already a closed union, consider returning in the 'blue' case and removing the default branch (or add an explicit fallthrough comment if you want to keep the structure).
| default: |