Skip to content

[#94] feat(guestbook): 방명록 및 댓글 작성 기능 구현 - #98

Merged
sageherb merged 2 commits into
devfrom
feature/guestbook-write
Nov 18, 2025
Merged

[#94] feat(guestbook): 방명록 및 댓글 작성 기능 구현#98
sageherb merged 2 commits into
devfrom
feature/guestbook-write

Conversation

@sageherb

Copy link
Copy Markdown
Collaborator

📖 개요

방명록 및 댓글 작성 기능 구현

✅ 관련 이슈

🛠️ 상세 작업 내용

  • 방명록 엔트리에 댓글을 작성할 수 있는 기능 추가
  • CommentWriteBox에 entryId 및 onSubmit props 전달하도록 수정
  • insertReply API 구현 및 GuestBook에 댓글 작성 로직 구현
  • searchFriends에서 userId가 undefined일 때 빈 배열 반환하도록 수정
  • 새로운 방명록 엔트리 작성 기능 구현
  • insertEntry API 추가 및 GuestBook 컴포넌트에 엔트리 생성 로직 연동
  • GuestbookWriteBox를 제어 컴포넌트로 수정하고 onSubmit 콜백 지원 추가

📸 스크린샷

N/A

⚠️ 주의 사항

N/A

👥 리뷰 확인 사항

N/A

- 방명록 엔트리에 댓글을 작성할 수 있는 기능 추가
- CommentWriteBox에 entryId 및 onSubmit props 전달하도록 수정
- insertReply API 구현 및 GuestBook에 댓글 작성 로직 구현
- searchFriends에서 userId가 undefined일 때 빈 배열 반환하도록 수정

Copilot AI left a comment

Copy link
Copy Markdown

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 guestbook entry and comment writing functionality, allowing users to create new guestbook entries and reply to existing ones. The changes convert the write components to controlled components with proper state management and integrate them with Supabase API calls.

  • Implemented insertEntry and insertReply API functions for creating guestbook entries and comments
  • Converted GuestbookWriteBox and CommentWriteBox to controlled components with onSubmit callbacks
  • Fixed searchFriends to return an empty array instead of undefined when userId is not provided
  • Corrected error logging to output actual error objects instead of the string "error"

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/pages/friends/api/searchFriends.ts Changed return value from undefined to empty array when userId is not provided
src/components/minihome/guestbook/api/guestbook.ts Added insertReply and insertEntry API functions; updated return type of getGuestBookWithComment for consistency
src/components/minihome/guestbook/GuestbookWriteBox.tsx Converted to controlled component with state management and onSubmit callback
src/components/minihome/guestbook/GuestBook.tsx Integrated write handlers for entries and replies; fixed error logging
src/components/minihome/guestbook/CommentWriteBox.tsx Converted to controlled component with state management and onSubmit callback

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

Comment thread src/components/minihome/guestbook/CommentWriteBox.tsx Outdated
Comment thread src/components/minihome/guestbook/api/guestbook.ts Outdated
Comment thread src/components/minihome/guestbook/GuestBook.tsx
Comment thread src/components/minihome/guestbook/GuestbookWriteBox.tsx Outdated
- 새로운 방명록 엔트리 작성 기능 구현
- insertEntry API 추가 및 GuestBook 컴포넌트에 엔트리 생성 로직 연동
- GuestbookWriteBox를 제어 컴포넌트로 수정하고 onSubmit 콜백 지원 추가
@sageherb
sageherb force-pushed the feature/guestbook-write branch from 95a8b1b to 30d16fe Compare November 18, 2025 05:31

@RumPumpumpum RumPumpumpum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

구현 확인했습니다.
고생하셨습니다~

@sageherb
sageherb merged commit 99147d9 into dev Nov 18, 2025
@sageherb
sageherb deleted the feature/guestbook-write branch November 18, 2025 05:33
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] 방명록 작성 기능 구현

4 participants