Skip to content

동아리 저장 기능 구현#61

Merged
jwchoi-kr merged 3 commits into
developfrom
feat/save-club
Jun 2, 2026
Merged

동아리 저장 기능 구현#61
jwchoi-kr merged 3 commits into
developfrom
feat/save-club

Conversation

@jwchoi-kr

Copy link
Copy Markdown
Collaborator

작업 내용

  • 동아리 저장 기능 구현. 기존에 동아리 목록저장된 동아리 목록을 전부 가져와서 filter하는 로직을, 애초부터 서버가 isSaved를 함께 내려오도록 수정(동아리 저장 기능 구현 allclear-web#70)
  • useSaveClub.ts 훅 구현. ClubList 및 동아리 상세 페이지에서 사용 예정
  • 저장 아이콘(하트)은 optimistic update 적용, debounce 300ms 적용하여 api call 최소화
  • club.ts의 모든 api endpoint v1 -> v2로 수정

변경 이유

  • 기존의 비효율적인 filter 로직 삭제
  • UX를 고려한 optimistic update와 서버 부하를 고려한 debounce를 모두 적용

테스트한 내용

  • 안드로이드 에뮬레이터에서 정상 작동
  • 시나리오 1: 비회원으로 저장 버튼 누르면 login bottom sheet 올라옴
  • 시나리오 2: 로그아웃 시 모든 저장 버튼 fill 안됨
  • 시나리오 3: 카테고리별 ClubList, 검색 화면의 ClubList, 저장한 동아리 목록의 ClubList에서 모두 저장 여부가 잘 sync되는 것을 확인
  • 시나리오 4: 빠르게 저장 버튼 누를 경우 debounce 적용 잘됨
  • 시나리오 5: 저장한 동아리 목록에서 저장 해제 시 debounce 없이 즉시 동아리 목록에서 동아리 제거

체크

  • 정상 동작 확인
  • UI 깨짐 없음
  • 콘솔 에러 없음

jwchoi-kr and others added 3 commits May 31, 2026 18:57
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a heart button to each club card that saves/unsaves a club with
debounced, optimistic React Query cache updates and rollback on failure.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Invalidate clubs, searchClubs, and savedClubs queries on login success so
saved state reflects the logged-in user, and reset the onSuccess ref when
the login sheet is dismissed to avoid firing a stale callback later.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jwchoi-kr jwchoi-kr changed the title Feat/save club 동아리 저장 로직 구현 May 31, 2026
@jwchoi-kr jwchoi-kr changed the title 동아리 저장 로직 구현 동아리 저장 기능 구현 May 31, 2026
@jwchoi-kr jwchoi-kr merged commit a772d1b into develop Jun 2, 2026
@jwchoi-kr jwchoi-kr deleted the feat/save-club branch June 7, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant