From 89a33ae2bf4107c349b2e614cea8e735bf6a03a0 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 16:45:27 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 150 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 31 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 41fbb4c..2cbc528 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -9,9 +9,43 @@ import TestimonialCardThirteen from '@/components/sections/testimonial/Testimoni import MetricCardTwo from '@/components/sections/metrics/MetricCardTwo'; import ContactSplit from '@/components/sections/contact/ContactSplit'; import FooterBaseReveal from '@/components/sections/footer/FooterBaseReveal'; -import { Sparkles, TrendingUp, Heart, Award, Leaf, Users, Star, Mail, BarChart3 } from 'lucide-react'; +import { Sparkles, TrendingUp, Heart, Award, Leaf, Users, Star, Mail, BarChart3, Plus } from 'lucide-react'; +import { useState } from 'react'; export default function LandingPage() { + const [products, setProducts] = useState([ + { + id: "1", name: "Elegance Dress", price: "$89.99", imageSrc: "http://img.b2bpic.net/free-photo/fashion-portrait-young-elegant-woman_1328-2692.jpg", imageAlt: "Stylish women's dress" + }, + { + id: "2", name: "Classic Oxford Shirt", price: "$64.99", imageSrc: "http://img.b2bpic.net/free-photo/portrait-young-confident-man-suit_171337-19984.jpg", imageAlt: "Men's button-up shirt" + }, + { + id: "3", name: "Premium Denim Jeans", price: "$79.99", imageSrc: "http://img.b2bpic.net/free-photo/woman-model-demonstrating-winter-cloths_1303-16949.jpg", imageAlt: "Classic denim jeans" + } + ]); + + const [showAddForm, setShowAddForm] = useState(false); + const [newProduct, setNewProduct] = useState({ + name: '', + price: '', + imageSrc: '' + }); + + const handleAddProduct = () => { + if (newProduct.name && newProduct.price && newProduct.imageSrc) { + setProducts([...products, { + id: String(products.length + 1), + name: newProduct.name, + price: newProduct.price, + imageSrc: newProduct.imageSrc, + imageAlt: newProduct.name + }]); + setNewProduct({ name: '', price: '', imageSrc: '' }); + setShowAddForm(false); + } + }; + return (
- +
+ + +
+ +
+ + {showAddForm && ( +
+

Add New Clothing Item

+
+
+ + setNewProduct({...newProduct, name: e.target.value})} + placeholder="Enter product name" + className="w-full px-3 py-2 border border-accent rounded-lg bg-background text-foreground placeholder-foreground/50" + /> +
+
+ + setNewProduct({...newProduct, price: e.target.value})} + placeholder="Enter price (e.g., $99.99)" + className="w-full px-3 py-2 border border-accent rounded-lg bg-background text-foreground placeholder-foreground/50" + /> +
+
+ + setNewProduct({...newProduct, imageSrc: e.target.value})} + placeholder="Enter image URL" + className="w-full px-3 py-2 border border-accent rounded-lg bg-background text-foreground placeholder-foreground/50" + /> +
+
+ + +
+
+
+ )} +
@@ -257,4 +345,4 @@ export default function LandingPage() {
); -} +} \ No newline at end of file -- 2.49.1