-
Notifications
You must be signed in to change notification settings - Fork 3
[#134] feat(avatar): 고스트 아이콘 폴백이 포함된 Avatar 컴포넌트 추가 및 리팩토링 #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a reusable Avatar component to centralize user profile image display logic across the application. The component handles missing user images by displaying a ghost.svg icon as a fallback, replacing scattered inline implementations.
- New Avatar component with automatic fallback to ghost icon
- Added ghost.svg icon asset for fallback display
- Replaced 6 inline avatar implementations with the new component
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Avatar/Avatar.tsx | New Avatar component with fallback to ghost icon |
| src/assets/icons/ghost.svg | New ghost icon asset for default avatar |
| src/features/minihome/post/detail/CommentItem.tsx | Replaced inline avatar rendering with Avatar component |
| src/features/minihome/home/HomePage.tsx | Replaced profile image rendering with Avatar component, removed fixed width |
| src/features/minihome/gallery/GalleryDetailPanel.tsx | Replaced inline avatar rendering with Avatar component |
| src/features/friends/search/Search.tsx | Replaced inline avatar rendering with Avatar component |
| src/features/friends/request/Request.tsx | Replaced inline avatar rendering with Avatar component |
| src/features/friends/list/List.tsx | Replaced inline avatar rendering with Avatar component |
| package-lock.json | Added use-sync-external-store dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RumPumpumpum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다~
- 사용자 이미지가 없을 때 ghost.svg 아이콘을 표시하는 Avatar 컴포넌트 구현 - ghost.svg 아이콘 에셋 신규 추가 - 이미지 로딩 실패 시 자동으로 폴백 아이콘 표시되도록 처리
- 친구 목록, 친구 요청, 사용자 검색, 갤러리 상세, 홈 화면, 댓글 아이템 등에서 사용하던 개별 <img> 및 폴백 처리 로직을 Avatar 컴포넌트로 일원화 - 중복된 아바타 렌더링 코드를 제거하여 유지보수성과 UI 일관성 개선 - 이미지 로딩 실패 시 Avatar 컴포넌트의 공통 폴백 아이콘이 자동 적용되도록 변경
5bd4f57 to
2ff618d
Compare
📖 개요
고스트 아이콘 폴백이 포함된 Avatar 컴포넌트 추가 및 리팩토링
✅ 관련 이슈
🛠️ 상세 작업 내용
📸 스크린샷
N/A
👥 리뷰 확인 사항
N/A