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

refactor: 토글 UI 제거 및 낙관적 업데이트 적용 #495

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

hozzijeong
Copy link
Collaborator

🔥 연관 이슈

🚀 작업 내용

  • 토글 UI제거
  • mutation 내부에서 토큰을 받아오도록 설정
  • 낙관적 업데이트 구현

💬 리뷰 중점사항

getQuery로 현재 토큰을 받아오는 로직을 제거하고 mutation 내부에서 token을 받도록 로직 변경. 그 과정에서 token이 null이라면 에러를 던지도록 설정

데이터를 미리 fetch하지 않기 때문에 사이드 이펙트가 발생할 확률이 줄어들었습니다.

단 토큰을 받을때 마다 약 1~2초 사이의 간격이 발생하는데 해당 UI를 낙관적 업데이트를 통해 일단은 되도록 설정헀습니다.

추가적으로 PushStatus에 있는 불필요한 프로퍼티를 제거했습니다

@hozzijeong hozzijeong added 🛠️ 리팩터링 리팩터링을 위한 이슈입니다 🍇 프론트엔드 프론트엔드 관련 이슈입니다 labels Jan 17, 2024
@hozzijeong hozzijeong self-assigned this Jan 17, 2024
@hozzijeong hozzijeong linked an issue Jan 17, 2024 that may be closed by this pull request
Copy link
Collaborator

@rawfishthelgh rawfishthelgh 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

@Kim0914 Kim0914 left a comment

Choose a reason for hiding this comment

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

확인했습니다 ㅎㅎ 렛주고

@Kim0914 Kim0914 merged commit 052fe2b into develop Jan 17, 2024
2 checks passed
@Kim0914 Kim0914 deleted the refactor/494-Change_Token_Get_to_Post branch January 17, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍇 프론트엔드 프론트엔드 관련 이슈입니다 🛠️ 리팩터링 리팩터링을 위한 이슈입니다
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

알림 API 토글 변경
3 participants