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: useDragIndexCarousel 인터페이스 useDragCarousel과 통합 #2

Merged
merged 3 commits into from
May 8, 2024

Conversation

d0422
Copy link
Member

@d0422 d0422 commented May 8, 2024

  • refactor: useDragIndexCarousel 인터페이스 useDragCarousel과 통합

배경

  1. Next에서 window객체를 찾을 수 없어 SSR에서 useDragIndexCarousel이 제대로 작동하지 않음 (getSliderWidth함수에서 window객체 참조)
  2. 이는 style객체를 따로 생성했기때문에 발생했던 문제인데, useCarousel에서는 이런 문제를 이미 해결했었음
  3. ref.current를 통해 style속성을 적용시키는 방식으로 변경
  4. 다시보니 useDragCarousel과 인터페이스가 다른 부분이 많아 통합 처리

변경점

  1. useDrageIndexCarousel 반환값 추가, 수정
  2. useDragCarouselndex 훅 삭제

@d0422 d0422 requested a review from HBSPS May 8, 2024 13:41
@d0422 d0422 self-assigned this May 8, 2024
@d0422 d0422 added the refactor refactor something label May 8, 2024
Copy link
Contributor

@HBSPS HBSPS left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@d0422 d0422 merged commit 0da4f0f into Rapiders:main May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor refactor something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants