Skip to content

Commit

Permalink
fixed pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
tuan2311 committed Aug 24, 2020
1 parent e318a26 commit a295773
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/ui/containers/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function Pagination({
pageRangeDisplayed?: number;
}) {
const [middlePage, setMiddlePage] = useState(current);
console.log(middlePage);
const pagesToShow: Set<any> = new Set();
for (const page of range(1, Math.min(1 + marginPagesDisplayed, numPages))) {
pagesToShow.add(page);
Expand Down Expand Up @@ -55,7 +54,7 @@ export function Pagination({
<div tw='flex flex-col items-center my-12'>
<div tw='flex text-gray-700'>
<div
tw='h-10 w-10 ml-1 flex justify-center items-center rounded-full bg-gray-200'
tw='h-10 w-10 mr-2 flex justify-center items-center rounded-full bg-gray-200'
className={cn({
'cursor-pointer': isInRange(current - 1, 1, numPages),
'opacity-50': !isInRange(current - 1, 1, numPages),
Expand Down Expand Up @@ -93,7 +92,7 @@ export function Pagination({
))}
</div>
<div
tw='h-10 w-10 ml-1 flex justify-center items-center rounded-full bg-gray-200'
tw='h-10 w-10 ml-2 flex justify-center items-center rounded-full bg-gray-200'
className={cn({
'cursor-pointer': isInRange(current + 1, 1, numPages),
'opacity-75': !isInRange(current + 1, 1, numPages),
Expand Down

0 comments on commit a295773

Please sign in to comment.