products page updated for loading

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-01-09 14:30:30 +05:00
parent 2f3f01f1fc
commit 5bb9a566ca
2 changed files with 26 additions and 32 deletions

View File

@@ -61,11 +61,14 @@ export function ProductsGrid() {
<div className="w-20 h-1 bg-primary mx-auto rounded-full" />
</motion.div>
{loading && <div className="w-full flex items-center justify-center">
<Loading /></div>}
{loading && (
<div className="w-full flex items-center justify-center">
<Loading />
</div>
)}
{/* Product Grid */}
{ loading|| allProducts && allProducts.length > 0 ? (
{loading || (allProducts && allProducts.length > 0) ? (
<motion.div
initial="hidden"
whileInView="visible"
@@ -74,9 +77,7 @@ export function ProductsGrid() {
>
{allProducts.map((product: any) => (
<motion.div key={product.id}>
<ProductCard
product={product}
/>
<ProductCard product={product} />
</motion.div>
))}
</motion.div>