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

프로필 상세 북마크 취소 시 데이터 반영 안되는 이슈 #299

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

yws1502
Copy link
Collaborator

@yws1502 yws1502 commented Feb 23, 2025

🔗 연관된 이슈


🗒 작업 목록

  • 북마크 등록 및 취소 mutation 함수의 onSuccess 이벤트에 invalid query key 수정

🧐 PR Point

  • 북마크 취소 시 프로필 상세에서 데이터가 갱신되는 것은 실시간으로 반영되었지만, 일기 목록에서 새롭게 북마크한 데이터는 바로 적용되지 않는 이슈가 발생하였습니다.
    • 해당 이슈에 대해 임시로 useQuery의 cacheTime을 0으로 지정하여 해결했지만, 더 좋은 방법에 대해 고민이 필요합니다.

💥 Trouble Shooting

  • 해당 작업을 하던 중 발생했던 문제에 대해 작성해주세요.

📸 스크린샷 / 피그마 링크

2025-02-23.3.34.51.mov

📚 참고

  • 참고한 내용 또는 링크를 입력해주세요.

✅ PR Submit 전 체크리스트

  • Merge 하는 브랜치는 main 브랜치가 아닙니다.
  • 코드에 크리티컬한 error 또는 warning이 존재하지 않습니다.
  • 불필요한 console이 존재하지 않습니다.

Copy link

vercel bot commented Feb 23, 2025

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

Name Status Preview Comments Updated (UTC)
a-daily-diary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 23, 2025 6:36am

@@ -12,6 +12,7 @@ export const useBookmarkedDiaries = (username: string) => {
currentPage: pageParam as number,
}),
getNextPageParam: (lastPage) => lastPage.nextPage,
cacheTime: 0, // FIXME: 더 좋은 방식에 대한 고민 필요
Copy link
Collaborator

Choose a reason for hiding this comment

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

ask;
invalidateQueries 수정한 부분만 적용해서 확인시에는 원하는대로 동작하는데 다시 한 번 확인 부탁드릴게요!
그리고 useBookmarkedDiaries 쿼리 키에 username이 들어가 있어서 username 제거하고 확인 해봐도 좋을 것 같아요!

@yws1502 yws1502 self-assigned this Feb 23, 2025
@yws1502 yws1502 added the 🐛 bug 버그 발생 label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 버그 발생
Projects
None yet
Development

Successfully merging this pull request may close these issues.

프로필 상세 북마크 취소 시 데이터 반영 안되는 이슈
2 participants