Skip to content
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

[FE] 리뷰 삭제 기능 구현 #780

Merged
merged 5 commits into from
Oct 18, 2023
Merged

[FE] 리뷰 삭제 기능 구현 #780

merged 5 commits into from
Oct 18, 2023

Conversation

xodms0309
Copy link
Collaborator

Issue

✨ 구현한 기능

스크린샷 2023-10-17 오전 10 20 12
  • ReviewRankingItem과 MemberReviewItem 분리 (서로 디자인도 다르고 삭제 기능이 추가 되면서 로직이 달라짐)
  • 마이페이지의 리뷰 목록에서 리뷰를 삭제할 수 있는 기능 추가

📢 논의하고 싶은 내용

  • 네이밍이랑 실수 없는지 봐주세요!

🎸 기타

x

⏰ 일정

  • 추정 시간 : 2시간
  • 걸린 시간 : 1.5시간

@github-actions
Copy link

github-actions bot commented Oct 17, 2023

Test Results

2 tests   2 ✔️  0s ⏱️
1 suites  0 💤
1 files    0

Results for commit d990fe1.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@hae-on hae-on left a comment

Choose a reason for hiding this comment

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

두번 읽었어요 잘 했어요

Copy link
Collaborator

@Leejin-Yang Leejin-Yang left a comment

Choose a reason for hiding this comment

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

타미 수고했어요! 삭제 기능도 이제 추가됐네요
큰 수정사항은 없어 보여요. 코멘트 확인해주세요!

const handleReviewDelete: MouseEventHandler<HTMLButtonElement> = (e) => {
e.preventDefault();

const result = window.confirm('리뷰를 삭제하시겠습니까?');
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

const { reviewId, productName, content, rating, favoriteCount } = review;

const handleReviewDelete: MouseEventHandler<HTMLButtonElement> = (e) => {
e.preventDefault();
Copy link
Collaborator

Choose a reason for hiding this comment

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

클릭이벤트에 어떤 동작을 막기 위해 썼나요? 궁금합니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

그 리뷰를 클릭하면 리뷰 상세페이지로 이동하는게 그거 막으려고 썼습니다!

Copy link
Collaborator

Choose a reason for hiding this comment

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

리스트에 링크가 있군요..! 좋습니다 👍


interface MemberReviewItemProps {
review: MemberReview;
isMemberPage: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

회원 리뷰면 이 prop은 없어도 될거 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이게 마이페이지에서 리뷰 전체 목록을 눌렀을 때만 삭제 아이콘이 뜨게끔 하기 위해서 저 prop을 추가한거에요! 만약 네이밍이 헷갈리다면 isMemberReviewListPage 이런식으로 바꿀까요??

Copy link
Collaborator

Choose a reason for hiding this comment

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

타미 의견도 좋고 미리보기를 기준으로 한다면 isPreview도 괜찮아보여요.!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

d990fe1
수정했슴다~

@xodms0309 xodms0309 merged commit 111d7ea into develop Oct 18, 2023
3 checks passed
@xodms0309 xodms0309 deleted the feat/issue-739 branch October 18, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] 리뷰 삭제 기능 구현
3 participants