diff --git a/app/home/Home.tsx b/app/home/Home.tsx index af6747f..0014b1b 100644 --- a/app/home/Home.tsx +++ b/app/home/Home.tsx @@ -1,13 +1,15 @@ import BannerSection from "./components/BannerSection"; import CategorySection from "./components/CategorySection"; +import ProductSection from "./components/ProductSection"; import StepSection from "./components/StepSection"; const Home = () => { return ( -
+
+
); }; diff --git a/app/home/components/ProductCard.tsx b/app/home/components/ProductCard.tsx new file mode 100644 index 0000000..fcc555a --- /dev/null +++ b/app/home/components/ProductCard.tsx @@ -0,0 +1,35 @@ +"use client"; +import Button from "@/app/components/Button"; +import ProductImage from "@/assets/images/product_image.png"; +import Image from "next/image"; +import { type FC } from "react"; +import { Rating } from "react-simple-star-rating"; + +const ProductCard: FC = () => { + return ( +
+
+ product-card +
+
+
جعبه کیبوردی
+
+ +
4.5
+
+
قیمت از
+
+
10,000,000
+
1,000,000 تومان
+
+
+ +
+
+
+ ); +}; + +export default ProductCard; diff --git a/app/home/components/ProductSection.tsx b/app/home/components/ProductSection.tsx new file mode 100644 index 0000000..0de8182 --- /dev/null +++ b/app/home/components/ProductSection.tsx @@ -0,0 +1,26 @@ +import { Carousel, CarouselControls, CarouselSlide, CarouselTrack } from "@/app/components/Carousel"; +import { type FC } from "react"; +import ProductCard from "./ProductCard"; + +const ProductSection: FC = () => { + return ( +
+ +
+
محبوب‌ترین محصولات
+ +
+ + + {Array.from({ length: 10 }).map((_, index) => ( + + + + ))} + +
+
+ ); +}; + +export default ProductSection; diff --git a/assets/images/product_image.png b/assets/images/product_image.png new file mode 100644 index 0000000..f57c749 Binary files /dev/null and b/assets/images/product_image.png differ diff --git a/package-lock.json b/package-lock.json index 8c4a5c1..05827f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "iconsax-reactjs": "^0.0.8", "next": "16.2.10", "react": "19.2.4", - "react-dom": "19.2.4" + "react-dom": "19.2.4", + "react-simple-star-rating": "^5.1.7" }, "devDependencies": { "@tailwindcss/postcss": "^4", @@ -5718,6 +5719,19 @@ "dev": true, "license": "MIT" }, + "node_modules/react-simple-star-rating": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/react-simple-star-rating/-/react-simple-star-rating-5.1.7.tgz", + "integrity": "sha512-NTFkW8W3uwvI82Fv7JW5i7gmDjEZKxJmj+Z9vn+BjYIXT6ILdnU9qnSUP2cWrWN/WAUlue81f9SgM4CQcenltQ==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", diff --git a/package.json b/package.json index e9e98c2..cf0fa8f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "iconsax-reactjs": "^0.0.8", "next": "16.2.10", "react": "19.2.4", - "react-dom": "19.2.4" + "react-dom": "19.2.4", + "react-simple-star-rating": "^5.1.7" }, "devDependencies": { "@tailwindcss/postcss": "^4",