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

[Fix] mutate 함수 이름 일부 변경 및 기타 사항 #64

Merged
merged 7 commits into from
Mar 8, 2024

Conversation

sihyun92
Copy link
Contributor

@sihyun92 sihyun92 commented Mar 7, 2024

📌 개요

open #63

작업한 내용에 대해 간단히 작성해주세요.

✅ 작업내용

  • CommentData 인터페이스 내용 변경
  • 댓글 좋아요 API 함수 작성
  • mutate 함수 각 기능에 맞게 이름 변경
  • useQuery로 받아오는 data 변수 각 용도에 맞게 이름 변경

📝 공유사항

팀원들에게 공유할 사항이나 변경 사항들을 작성해주세요.

  • 아직 좋아요 삭제 API가 구현되지 않아서 좋아요 토글 기능은 미구현 상태입니다.
  • 오늘의 승부예측 투표 토글 기능도 API 수정 중이라 미구현 상태입니다.

- post -> postComment
- 좋아요 카운트 props 이름을 likeCount로 변경
- 좋아요 기능 API 연동 완료
- 추후 좋아요 삭제 API 작성 예정
- data가 중복되서 사용되는 것을 막기 위해 todatData로 변경
- 오늘의 승부예측 팀 선택 시 gameId 값 필요
- todayData 내부에 있는 gameId를 ScoreListItem으로 전달
- useMutation을 이용한 홈 팀, 원정 팀 선택 api 연동 완료
- 현재 선택을 하고 새로고침을 했을 시에 선택 UI가 초기화되는 문제 발생(해결 중)
- api 작동에는 문제 없음
- mutate 함수 이름을 removeComment로 변경
- useMutation으로 댓글 삭제 API 함수 구현 완료
- onRemove 이벤트 함수 구현 완료
- useCallback을 이용해서 리액트가 함수를 저장하고 의존성 배열이 바뀌지 않으면 함수를 재생성하는 것을 막아서 효율성 확대
Copy link

vercel bot commented Mar 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
client ✅ Ready (Inspect) Visit Preview Mar 7, 2024 10:37am

@doitidey doitidey self-requested a review March 8, 2024 06:16
@doitidey doitidey added the Refactor 리팩토링 label Mar 8, 2024
@doitidey doitidey merged commit 0e8a6eb into dev Mar 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor 리팩토링
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants