diff --git a/src/components/ProductList.js b/src/components/ProductList.js index b5d0e4a..fe53a9a 100644 --- a/src/components/ProductList.js +++ b/src/components/ProductList.js @@ -122,10 +122,8 @@ class ProductList extends Component { } renderPagination = (pages, page) => { - // Don't show pagination when there are zero products - if (this.props.products.length === 0) { - return null; - } + // Make pagination invisible when there are zero products to avoid layout shifts + const hasProducts = this.props.products.length > 0; return ( {(this.state.itemsPerPage==='all')?null: