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

[FEAT] onboarding page carousel 기능 구현 및 API 붙이기 #9

Merged
merged 2 commits into from
Jan 1, 2024

Conversation

eonseok-jeon
Copy link
Contributor

🔥 Related Issues

👻 작업 내용

  • �책 리스트 보여주는 get API 붙이기
  • 캐러셀 기능 구현
  • 바로가기 버튼 클릭 시 메인 페이지로 이동

✅ PR Point

  • 개선될 점이 있을까요?

😡 Trouble Shooting

const OnboardingBookList = styled.ul<InOnboardingBookListProps>`
  width: 100%;
  height: 100%;
  display: flex;
  gap: 4rem;
  transition: all 0.3s ease;
  transform: ${({ $activeIndex }) =>
    `translateX(calc(50vw - 5rem - ((25rem) / 2) - ${$activeIndex * 29}rem))`};
  /* 전체 너비 - 왼쪽 화살표 아이콘 크기 - 이미지 절반 - 해당 index*/
`;

첫 화면 렌더 시 리스트 첫 번째 책이 센터에 가있도록 (아래 사진과 같이) 하고 싶었는데
그냥 25rem 이런 식으로 하드 코딩 박아버리면 페이지 크기 줄어들 때 또 깨져버리기 때문에
calc 이용해서 구현을 했습니다

👀 스크린샷 / GIF / 링크

스크린샷 2024-01-01 오후 2 55 25

📚 Reference

@eonseok-jeon eonseok-jeon added this to the api milestone Jan 1, 2024
@eonseok-jeon eonseok-jeon requested a review from hae2ni January 1, 2024 05:57
@eonseok-jeon eonseok-jeon self-assigned this Jan 1, 2024
@eonseok-jeon eonseok-jeon linked an issue Jan 1, 2024 that may be closed by this pull request
3 tasks
@eonseok-jeon eonseok-jeon changed the base branch from main to develop January 1, 2024 08:30
@eonseok-jeon eonseok-jeon merged commit e9f3b16 into develop Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ FEAT ] onboarding API 연결
1 participant