1- // ShopContent Component - Main shop page with filtering and pagination
21import { useState , useEffect } from "react" ;
32import { useParams , useNavigate } from "react-router-dom" ;
43import "./ShopContent.scss" ;
@@ -298,18 +297,6 @@ const ShopContent = () => {
298297 return matchesCategory && matchesPrice && matchesBrand && matchesSearch ;
299298 } ) ;
300299
301- console . log ( "ShopContent - Debug:" , {
302- totalProducts : products . length ,
303- filteredCount : filteredProducts . length ,
304- currentProductsCount : filteredProducts . slice (
305- indexOfFirstProduct ,
306- indexOfLastProduct ,
307- ) . length ,
308- selectedMainCategory,
309- isLoadingProducts,
310- config : config . useMockData ,
311- } ) ;
312-
313300 const totalProducts = filteredProducts . length ;
314301 const totalPages = Math . ceil ( totalProducts / productsPerPage ) ;
315302 const indexOfLastProduct = currentPage * productsPerPage ;
@@ -319,6 +306,15 @@ const ShopContent = () => {
319306 indexOfLastProduct ,
320307 ) ;
321308
309+ console . log ( "ShopContent - Debug:" , {
310+ totalProducts : products . length ,
311+ filteredCount : filteredProducts . length ,
312+ currentProductsCount : currentProducts . length ,
313+ selectedMainCategory,
314+ isLoadingProducts,
315+ config : config . useMockData ,
316+ } ) ;
317+
322318 const getCategoryIcon = ( categoryName ) => {
323319 const name = categoryName . toLowerCase ( ) ;
324320
0 commit comments