diff --git a/src/app/product/[id]/page.tsx b/src/app/product/[id]/page.tsx index 9e34927..f1200f6 100644 --- a/src/app/product/[id]/page.tsx +++ b/src/app/product/[id]/page.tsx @@ -3,7 +3,7 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered"; import FooterCard from "@/components/sections/footer/FooterCard"; -import { Instagram, Twitter, Youtube } from "lucide-react"; +import { Instagram, Twitter, Youtube, ShoppingCart, Heart, Share2 } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; @@ -20,28 +20,7 @@ const TikTok = (props: React.SVGProps) => ( ); -const products: Record = { - "1": { - id: "1", name: "Classic Black Hoodie", price: "$89.99", originalPrice: "$119.99", description: "Our signature black hoodie - a timeless essential for any streetwear collection. Premium 100% cotton blend with soft interior lining. Features a kangaroo pocket, drawstring with metal tips, and embroidered Umbra logo on the chest.", images: [ - "http://img.b2bpic.net/free-photo/medium-shot-man-posing-with-hoodie-indoors_23-2149359859.jpg", "http://img.b2bpic.net/free-photo/medium-shot-man-posing-with-hoodie-indoors_23-2149359859.jpg"], - sizes: ["XS", "S", "M", "L", "XL", "2XL"], - colors: ["Black", "Charcoal", "Navy"], - rating: 4.8, - reviews: 342, - inStock: true, - }, - "2": { - id: "2", name: "Vintage Denim Jacket", price: "$129.99", description: "Classic denim jacket with a vintage washed finish. Perfect layering piece for any outfit. Features button closure, flap pockets, and adjustable waist tabs.", images: [ - "http://img.b2bpic.net/free-photo/fashionable-woman-wearing-denim-jacket_23-2148859621.jpg"], - sizes: ["XS", "S", "M", "L", "XL", "2XL"], - colors: ["Indigo", "Light Wash", "Dark Wash"], - rating: 4.6, - reviews: 218, - inStock: true, - }, -}; - -export default function ProductPage({ params }: { params: { id: string } }) { +export default function ProductPage() { const navItems = [ { name: "Shop", id: "products" }, { name: "Collections", id: "collections" }, @@ -50,11 +29,10 @@ export default function ProductPage({ params }: { params: { id: string } }) { { name: "Contact", id: "contact" }, ]; - const product = products[params.id] || products["1"]; const [quantity, setQuantity] = useState(1); - const [selectedSize, setSelectedSize] = useState(product.sizes[2]); - const [selectedColor, setSelectedColor] = useState(product.colors[0]); - const [selectedImage, setSelectedImage] = useState(0); + const [selectedSize, setSelectedSize] = useState("M"); + const [selectedColor, setSelectedColor] = useState("Black"); + const [isFavorite, setIsFavorite] = useState(false); const socialLinks = [ { icon: Instagram, href: "https://instagram.com/umbra", ariaLabel: "Instagram" }, @@ -63,6 +41,15 @@ export default function ProductPage({ params }: { params: { id: string } }) { { icon: Youtube, href: "https://youtube.com/@umbra", ariaLabel: "YouTube" }, ]; + const product = { + id: "1", name: "Classic Black Hoodie", price: 89.99, + description: "Our signature Classic Black Hoodie combines premium comfort with timeless style. Crafted from high-quality cotton blend fabric, this oversized hoodie features a spacious kangaroo pocket, adjustable drawstrings, and reinforced seams for durability. Perfect for layering or wearing solo, it's the essential streetwear piece for any wardrobe.", image: "http://img.b2bpic.net/free-photo/medium-shot-man-posing-with-hoodie-indoors_23-2149359859.jpg", rating: 4.8, + reviewCount: 247, + inStock: true, + sizes: ["XS", "S", "M", "L", "XL", "XXL"], + colors: ["Black", "Gray", "Navy", "White"], + material: "80% Cotton, 20% Polyester", care: "Machine wash cold with similar colors. Tumble dry low."}; + return ( -
+
← Back to Shop -
- {/* Product Images */} -
-
+
+ {/* Product Image */} +
+
{product.name}
-
- {product.images.map((img: string, idx: number) => ( - - ))} -
{/* Product Details */} -
-

{product.name}

+
+

{product.name}

-
- {[...Array(5)].map((_, i) => ( - - ★ - - ))} -
- ({product.reviews} reviews) -
- -
- {product.price} - {product.originalPrice && ( - {product.originalPrice} - )} -
- -

{product.description}

- - {/* Color Selection */} -
- -
- {product.colors.map((color: string) => ( - - ))} +
+ {product.rating} + ({product.reviewCount} reviews)
+
+ ${product.price.toFixed(2)} +
+ +

{product.description}

+ {/* Size Selection */}
- -
- {product.sizes.map((size: string) => ( + +
+ {product.sizes.map((size) => (
+ {/* Color Selection */} +
+ +
+ {product.colors.map((color) => ( + + ))} +
+
+ {/* Quantity */}
- -
+ +
- {quantity} + {quantity}
- {/* Add to Cart Button */} - + {/* Action Buttons */} +
+ +
+ + +
+
- - - {/* Stock Status */} {product.inStock ? ( -

✓ In Stock - Ships within 24 hours

+

✓ In Stock - Ships within 24 hours

) : ( -

Out of Stock - Notify me when available

+

Out of Stock

)}
+ + {/* Product Info */} +
+
+

Material & Care

+

+ Material: {product.material} +

+

+ Care: {product.care} +

+
+
+

Shipping & Returns

+

• Free shipping on orders over $150

+

• 30-day returns with free return shipping

+

• Easy exchanges within 30 days

+
+