File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
web_admin/src/components/pages/product Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const Products = () => {
16
16
const { loading, error, products, numOfPages } = productList ;
17
17
18
18
let pageNum = 0 ;
19
- let productsPerPage = 1 ;
19
+ let productsPerPage = 10 ;
20
20
const handlePageClick = ( data ) => {
21
21
pageNum = data . selected ;
22
22
dispatch ( listProducts ( pageNum , productsPerPage ) ) ;
@@ -62,10 +62,8 @@ const Products = () => {
62
62
</ tbody >
63
63
</ table >
64
64
</ div >
65
- < div className = "mt-4" >
66
- {
67
-
68
- < ReactPaginate
65
+ < div className = { 'mt-4' + ( numOfPages ? '' : ' d-none' ) } >
66
+ < ReactPaginate
69
67
previousLabel = { "Previous" }
70
68
nextLabel = { "Next" }
71
69
breakLabel = { "..." }
@@ -83,9 +81,7 @@ const Products = () => {
83
81
breakClassName = { "page-item" }
84
82
breakLinkClassName = { "page-link" }
85
83
activeClassName = { "active" }
86
- />
87
- }
88
-
84
+ />
89
85
</ div >
90
86
</ div >
91
87
</ div >
You can’t perform that action at this time.
0 commit comments