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

Hotfix: 페이지네이션 ul 에 li 태그 추가 #192

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 49 additions & 41 deletions src/components/commons/Pagination/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,30 @@ const Pagination = ({ totalCount, pageState, postPerPage, onClick }: PaginationP

return (
showPagination && (
<nav aria-label='Page Navigation'>
<nav role='presentation' aria-label='Page Navigation'>
<ul className={cx('pagination')}>
<button onClick={handleFirstPageClick}>
<Image
className={cx({ 'pagination-arrow-activated': currentPageGroupIndex })}
src={left.double.url}
alt={left.double.alt}
width={24}
height={24}
/>
</button>
<button onClick={handlePrevButtonClick}>
<Image
className={cx({ 'pagination-arrow-activated': currentPageGroupIndex })}
src={left.single.url}
alt={left.single.alt}
width={20}
height={20}
/>
</button>
<li>
<button onClick={handleFirstPageClick}>
<Image
className={cx({ 'pagination-arrow-activated': currentPageGroupIndex })}
src={left.double.url}
alt={left.double.alt}
width={24}
height={24}
/>
</button>
</li>
<li>
<button onClick={handlePrevButtonClick}>
<Image
className={cx({ 'pagination-arrow-activated': currentPageGroupIndex })}
src={left.single.url}
alt={left.single.alt}
width={20}
height={20}
/>
</button>
</li>
{currentPageGroup.map((pageNumber, index) => (
<li key={`page-${index}`}>
<button
Expand All @@ -66,28 +70,32 @@ const Pagination = ({ totalCount, pageState, postPerPage, onClick }: PaginationP
</button>
</li>
))}
<button onClick={handleNextButtonClick}>
<Image
className={cx({
'pagination-arrow-activated': isArrowActivated,
})}
src={right.single.url}
alt={right.single.alt}
width={20}
height={20}
/>
</button>
<button onClick={handleLastPageClick}>
<Image
className={cx({
'pagination-arrow-activated': isArrowActivated,
})}
src={right.double.url}
alt={right.double.alt}
width={24}
height={24}
/>
</button>
<li>
<button onClick={handleNextButtonClick}>
<Image
className={cx({
'pagination-arrow-activated': isArrowActivated,
})}
src={right.single.url}
alt={right.single.alt}
width={20}
height={20}
/>
</button>
</li>
<li>
<button onClick={handleLastPageClick}>
<Image
className={cx({
'pagination-arrow-activated': isArrowActivated,
})}
src={right.double.url}
alt={right.double.alt}
width={24}
height={24}
/>
</button>
</li>
</ul>
</nav>
)
Expand Down