Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
umidullo committed Nov 13, 2023
1 parent a0f18a2 commit db4c5c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/portfolio/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ export default function Page({
/>
))}
</div>
{query.page ? (
{query.page && posts.pagination.totalPages ? (
<div className="mt-20 w-full flex justify-center text-white">
<ReactPaginate
breakLabel={"..."}
nextLabel={<Arrow className="w-5 h-5 rotate-180" />}
pageRangeDisplayed={5}
pageCount={posts.pagination.totalPages}
initialPage={+query.page - 1}
initialPage={Number(query.page) - 1}
onPageChange={({ selected }) =>
setQueryParam(`${selected + 1}`)
}
Expand Down

0 comments on commit db4c5c5

Please sign in to comment.