Skip to content

Conversation

@sageherb
Copy link
Collaborator

@sageherb sageherb commented Nov 19, 2025

📖 개요

고스트 아이콘 폴백이 포함된 Avatar 컴포넌트 추가 및 리팩토링

✅ 관련 이슈

🛠️ 상세 작업 내용

  • 사용자 이미지가 없을 때 ghost.svg 아이콘을 표시하는 Avatar 컴포넌트 구현
  • ghost.svg 아이콘 에셋 신규 추가
  • 이미지 로딩 실패 시 자동으로 폴백 아이콘 표시되도록 처리
  • 친구 목록, 친구 요청, 사용자 검색, 갤러리 상세, 홈 화면, 댓글 아이템 등에서 사용하던 및 폴백 처리 로직을 Avatar 컴포넌트로 일원화
  • 중복된 아바타 렌더링 코드를 제거하여 유지보수성과 UI 일관성 개선
  • 이미지 로딩 실패 시 Avatar 컴포넌트의 공통 폴백 아이콘이 자동 적용되도록 변경

📸 스크린샷

스크린샷 2025-11-19 23 24 47

⚠️ 주의 사항

N/A

👥 리뷰 확인 사항

N/A

@sageherb sageherb requested a review from Copilot November 19, 2025 14:28
@vercel
Copy link

vercel bot commented Nov 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
backspace Ready Ready Preview Comment Nov 19, 2025 2:42pm

Copy link

Copilot AI left a 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.

@prgrms-fe-devcourse prgrms-fe-devcourse deleted a comment from Copilot AI Nov 19, 2025
@sageherb sageherb changed the title Feature/avatar [#134] feat(avatar): 고스트 아이콘 폴백이 포함된 Avatar 컴포넌트 추가 및 리팩토링 Nov 19, 2025
Copy link
Collaborator

@RumPumpumpum RumPumpumpum left a 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 컴포넌트의 공통 폴백 아이콘이 자동 적용되도록 변경
@sageherb sageherb merged commit 08adb92 into dev Nov 19, 2025
2 checks passed
@sageherb sageherb deleted the feature/avatar branch November 19, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Avatar 컴포넌트 구현 및 디폴트 아바타 제작

4 participants