Skip to content

Conversation

@RumPumpumpum
Copy link
Collaborator

@RumPumpumpum RumPumpumpum commented Nov 19, 2025

📖 개요

서로 이미 친구인 경우에도 “친구 신청” 버튼이 노출되던 현상 해결

✅ 관련 이슈

🛠️ 상세 작업 내용

  • friends 조회 로직 추가로 isFriend 상태 관리
  • 친구 관계일 때 friendRequested 초기화 및 버튼 렌더 조건 !isMine && !isFriend로 변경
  • toggleFriendRequest에서 이미 친구면 insert/delete를 수행하지 않도록 구현

📸 스크린샷

image

⚠️ 주의 사항

👥 리뷰 확인 사항

@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 5:02pm

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 fixes an issue where the "친구 신청" (friend request) button was being displayed even when users were already friends. The fix introduces a new check to determine if a friendship already exists before showing the button.

  • Added friendship status check using the friends table
  • Conditional logic to skip friend request query when users are already friends
  • Updated button rendering condition to exclude already-friends case

💡 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
Copy link
Collaborator

@sageherb sageherb left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

@sageherb sageherb merged commit 9aa0f21 into dev Nov 19, 2025
9 checks passed
@sageherb sageherb deleted the fix/minihome-friends-button branch November 19, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 버그 포함 수정 필요

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 미니홈의 홈 탭에서 이미 친구 상태일 때 친구 신청 버튼이 뜨는 문제

3 participants