Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jun 8, 2025

📌 변경 사항 개요

📝 상세 내용

  • 페이지네이션 기능 구현
  • 페이지 수가 7개 이하면 -> 번호만 렌더링
  • 7개 초과일 경우 -> 7개씩 묶어서 이전/다음 버튼으로 이동 가능
  • 마지막 그룹이 7개 미만일 경우 -> 해당 개수만 표시 (9페이지일 경우 8,9만 보임)

🔗 관련 이슈

🖼️ 스크린샷(선택사항)

💡 참고 사항

<Pagination
totalPages={23} // 총 페이지 수
currentPage={currentPage} // 현재 페이지
onChangePage={setCurrentPage} // 함수
/>

이런식으로 Props 받아서 사용하시면 됩니다

@ghost ghost changed the title ✨ feat: 페이지네이션 구현 #4 ✨ feat: 페이지네이션 구현 Jun 8, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

❗ 해당 파일에서 충돌이 일어나는 이유가 최신 develop branch에서 merge를 안해와서 그런 것 같습니다~ pr merge 하기 전에 최신 변경사항 반영 해주세용

@Moon-ju-young Moon-ju-young added the ✨ 기능 추가/구현 새로운 기능을 추가하거나 구현했어요! label Jun 8, 2025
key={page}
type="button"
onClick={() => handleClick(page)}
className={`flex h-10 w-10 items-center justify-center rounded text-sm ${
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
className={`flex h-10 w-10 items-center justify-center rounded text-sm ${
className={`flex size-10 items-center justify-center rounded text-body2 ${

💬 height와 width가 같은 경우 size로 쓸 수 있습니다~

Copy link
Author

Choose a reason for hiding this comment

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

네 감사합니다!! tailwind가 익숙하지 않다보니...감사합니당

className={`flex h-10 w-10 items-center justify-center rounded text-sm ${
currentPage === page
? 'bg-[#FF8D72] font-bold text-white'
: 'text-black hover:bg-gray-100'
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ hover 스타일은 임의로 추가하신 건가요?

Copy link
Author

Choose a reason for hiding this comment

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

ux적으로 저런 호버 있는 사이트들이 많아서 넣었는데 다시 보니까 그렇게 필요하지 않을 듯 합니다

Copy link
Contributor

@Moon-ju-young Moon-ju-young left a comment

Choose a reason for hiding this comment

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

추가로 최신 반영되지 않은 develop 브랜치를 merge하신 거 같아요! 다음 번부터는 develop 브랜치를 최신화 하고 merge하시는 게 좋을 것 같습니다!

@Yun-Jinwoo Yun-Jinwoo assigned ghost Jun 13, 2025
Copy link
Contributor

@Moon-ju-young Moon-ju-young left a comment

Choose a reason for hiding this comment

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

branch에 최신 변경 사항이 적용이 안 되어있어요!! 그 때문에 --spacing 설정이 다른 듯합니다. #17 참고하시고 최신 develop branch merge 하셔서 단위 수정 부탁드립니다!

Copy link
Contributor

@Moon-ju-young Moon-ju-young left a comment

Choose a reason for hiding this comment

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

수정사항 모두 완료하신 건가요? 최신 사항 반영 (spacing 설정)이 아직 완료되지 않은 것 같네요~

@Moon-ju-young Moon-ju-young merged commit fca73c4 into develop Jun 18, 2025
2 checks passed
@Moon-ju-young Moon-ju-young deleted the feat/pagination branch June 18, 2025 10:13
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.

2 participants