Skip to content

Conversation

@RumPumpumpum
Copy link
Collaborator

@RumPumpumpum RumPumpumpum commented Nov 19, 2025

📖 개요

메모 게시글 리스트가 로그인 사용자 닉네임으로 표시되던 문제를 고치고, 홈 주인의 닉네임을 가져와 보여주도록 수정했습니다.

✅ 관련 이슈

🛠️ 상세 작업 내용

  • useAuthUser를 authorName으로 지정하고 있던 것 제거
  • 조인을 통해서 homepage의 Id와 함께 homepage의 onwer_id를 이용해 nickname을 가져오도록 구현
  • 조회한 닉네임을 상태로 보관하고 PostItem에 전달

📸 스크린샷

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 3:24pm

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 a bug where memo post list items were displaying the logged-in user's nickname instead of the homepage owner's nickname. The implementation now correctly fetches and displays the homepage owner's nickname.

  • Removed incorrect use of useAuthUser hook for author name
  • Implemented a JOIN query to fetch the homepage owner's nickname from the profiles table
  • Added state management to store and pass the owner's nickname to PostItem components
Comments suppressed due to low confidence (1)

src/features/minihome/post/list/PostList.tsx:21

  • The ownerNickname state should be reset when the component starts fetching new data. Currently, if the ownerId prop changes or if the homepage query fails (lines 34-38), the state retains the previous owner's nickname, which could display incorrect information.

Consider resetting the state at the beginning of fetchPosts():

async function fetchPosts() {
  setIsLoading(true);
  setOwnerNickname("주인장"); // Reset to default

  if (!ownerId) {
    setIsLoading(false);
    return;
  }
  // ... rest of the function
    async function fetchPosts() {
      setIsLoading(true);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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 66e20a4 into dev Nov 19, 2025
8 of 9 checks passed
@sageherb sageherb deleted the fix/memo-author branch November 19, 2025 15:41
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