Skip to content

Commit dfc28f4

Browse files
committed
updated in mobile devices too
1 parent 389b55b commit dfc28f4

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

client/src/components/Pagination/Pagination.jsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,10 @@ export default function Pagination({ pageNo, setPageNo, totalPages }) {
99
return (
1010
<div className="flex items-center justify-between border-t border-gray-200 bg-transparent px-4 py-3 sm:px-6">
1111

12-
{/* For mobile devices */}
13-
<div className="flex flex-1 justify-between sm:hidden">
14-
<button
15-
href="#"
16-
className="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50"
17-
>
18-
Previous
19-
</button>
20-
<button
21-
href="#"
22-
className="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50"
23-
>
24-
Next
25-
</button>
26-
</div>
12+
2713

2814
{/* For larger devices */}
29-
<div className="hidden sm:flex sm:flex-1 sm:items-center sm:justify-center">
15+
<div className="flex flex-1 items-center justify-center">
3016
<div>
3117
<nav className="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
3218
<button onClick={() => {
@@ -39,7 +25,6 @@ export default function Pagination({ pageNo, setPageNo, totalPages }) {
3925

4026
{
4127
Array.from({ length: totalPages }, (_, index) => index + 1).map((item) => {
42-
console.log(item)
4328
return (
4429
<button
4530
key={item}

0 commit comments

Comments
 (0)