fix: updated the page app
This commit is contained in:
1 parent
52bdccd4d1
commit
36684964f4
1 file changed
+10
-2
+10
-2
@@ -2,8 +2,12 @@ import Image from "next/image";
|
||||
|
||||
import SearchBar from "@/components/SearchBar";
|
||||
import HeroCarousel from "@/components/HeroCarousel";
|
||||
import { getAllProducts } from "@/lib/actions";
|
||||
import ProductCard from "@/components/ProductCard";
|
||||
|
||||
const Home = async () => {
|
||||
const allProducts = await getAllProducts();
|
||||
|
||||
const Home = () => {
|
||||
return (
|
||||
<>
|
||||
<section className="px-6 md: px-20 py-24">
|
||||
@@ -36,7 +40,11 @@ const Home = () => {
|
||||
<section className="trending-section">
|
||||
<h2 className="section-text">Trending</h2>
|
||||
|
||||
<div className="flex flex-wrap gap-x-8 gap-y-16">{/* Products */}</div>
|
||||
<div className="flex flex-wrap gap-x-8 gap-y-16">
|
||||
{allProducts?.map((product) => (
|
||||
<ProductCard key={product._id} product={product} />
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user