Files
bestpc/src/pages/product/ProductPage.jsx

35 lines
929 B
React
Raw Normal View History

2025-05-05 17:28:22 +07:00
import "./style.css";
const ProductPage = () => {
const { id } = useParams(); // Lấy id sản phẩm từ URL
const product = {
id: id,
name: `Product ${id}`,
description: "Detailed description of the product.",
price: 99.99,
imageUrl: "https://via.placeholder.com/400",
features: ["Feature 1", "Feature 2", "Feature 3"],
reviews: [
{ text: "Great product!", rating: 5 },
{ text: "Good value for money.", rating: 4 },
{ text: "Could be better.", rating: 3 },
],
};
return (
<div className="product-page">
<ProductImage imageUrl={product.imageUrl} altText={product.name} />
<ProductDetail
name={product.name}
description={product.description}
price={product.price}
/>
<ProductFeatures features={product.features} />
<ProductReviews reviews={product.reviews} />
</div>
);
};
export default ProductPage;