Skip to content

Commit

Permalink
関数、プロパティ、イベントをVue版に合わせて修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Takuya-Sakai91 committed Jan 13, 2024
1 parent 95409d8 commit 27b1d67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/javascript/components/Pager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export default function Pager({
clickHandle
}) {
const makeITag = (iconName) => {
return `<i class='fas fa-angle-${iconName}'></i>`
return <i className={`fas fa-angle-${iconName}`}></i>
}

return (
<ReactPaginate
forcePage={initialPageNumber - 1}
forcePage={initialPageNumber}
pageCount={pageCount}
pageRangeDisplayed={pageRange}
onPageChange={clickHandle}
onPageChange={(event) => clickHandle(event.selected + 1)}
previousLabel={makeITag('left')}
nextLabel={makeITag('right')}
breakLabel={'...'}
Expand Down

0 comments on commit 27b1d67

Please sign in to comment.