products page updated for loading
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user