From d406642f7c36575f3f5a8ce895e4f6b32a4107e7 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 4 Jun 2026 15:41:51 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 96 +++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 51 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index a0cabd1..92bb793 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -16,20 +16,44 @@ import TestimonialCardTwelve from '@/components/sections/testimonial/Testimonial import { Coffee, Heart, Smile, Star, Utensils } from "lucide-react"; export default function LandingPage() { - const handleProductClick = (product: { - id: string; - name: string; - price: string; - variant: string; - imageSrc: string; - imageAlt?: string; - advantages: string[]; - ingredients: string[]; - }) => { - alert( - `You clicked on ${product.name}!\n\nAdvantages: ${product.advantages.join(", ")}\n\nIngredients: ${product.ingredients.join(", ")}` - ); - // In a real application, this would open a modal or navigate to a detail page + const rawProductsData = [ + { + id: "p1", name: "Veg Maharaja Burger", price: "₹150", variant: "Signature", imageSrc: "http://img.b2bpic.net/free-photo/burger-menu-two-pax-with-soft-drinks_114579-2516.jpg", imageAlt: "Gourmet Veg Maharaja Burger", advantages: ["Satisfying & Wholesome", "Rich Indian Flavors", "Pure Vegetarian Delight", "Perfect for a Hearty Meal"], + ingredients: ["Large Veg Patty", "Fresh Lettuce", "Tomato Slices", "Onions", "Cheese Slice", "Special Maharaja Sauce", "Sesame Bun"], + }, + { + id: "p2", name: "Paneer Tikka Pizza", price: "₹200", variant: "Spicy Pure Veg", imageSrc: "http://img.b2bpic.net/free-photo/top-view-pizza-with-chicken-mushrooms-cherry-tomatoes-topped-with-urugula-rustic-table_141793-4264.jpg", imageAlt: "Paneer Tikka Pizza", advantages: ["Irresistible Fusion", "Spicy & Flavorful", "Hand-tossed Dough", "Protein-rich Paneer"], + ingredients: ["Freshly Baked Crust", "Tangy Pizza Sauce", "Mozzarella Cheese", "Marinated Paneer Tikka Cubes", "Capsicum", "Onions", "Coriander"], + }, + { + id: "p3", name: "Cold Coffee Classic", price: "₹90", variant: "Refreshing", imageSrc: "http://img.b2bpic.net/free-photo/coffee-beans-black-background-with-cup-drink_114579-16652.jpg", imageAlt: "Classic Cold Coffee", advantages: ["Perfect Chill", "Energizing Boost", "Creamy & Smooth Texture", "Timeless Favorite"], + ingredients: ["Espresso Shot", "Chilled Milk", "Sugar Syrup", "Ice Cubes", "Whipped Cream (optional)", "Chocolate Drizzle (optional)"], + }, + { + id: "p4", name: "Crispy French Fries", price: "₹70", variant: "Perfect Snack", imageSrc: "http://img.b2bpic.net/free-photo/top-view-tasty-fried-potatoes-inside-plate-with-seasonings-dark-surface_140725-88252.jpg", imageAlt: "Crispy French Fries", advantages: ["Irresistibly Crunchy", "Perfect Side Snack", "Lightly Salted", "Golden Perfection"], + ingredients: ["Selected Potatoes", "Cooking Oil", "Salt", "Special Seasoning Blend"], + }, + { + id: "p5", name: "Veg Club Sandwich", price: "₹120", variant: "Hearty & Healthy", imageSrc: "http://img.b2bpic.net/free-photo/top-view-triangular-sandwiches-plate-with-cutlery-cucumber-slices_23-2148465154.jpg", imageAlt: "Pure Veg Club Sandwich", advantages: ["Layered Goodness", "Fresh & Filling", "Quick Meal Option", "Healthy Choice"], + ingredients: ["Toasted Bread Slices", "Cucumber", "Tomato", "Lettuce", "Cheese", "Veg Mayonnaise", "Green Chutney", "Boiled Potato Slices"], + }, + { + id: "p6", name: "Chocolate Shake", price: "₹100", variant: "Sweet Indulgence", imageSrc: "http://img.b2bpic.net/free-photo/iced-coffees-with-whipped-cream-chocolate_1150-18521.jpg", imageAlt: "Rich Chocolate Shake", advantages: ["Decadent & Sweet", "Rich Chocolate Flavor", "Refreshing Treat", "Smooth & Thick"], + ingredients: ["Milk", "Chocolate Syrup", "Cocoa Powder", "Vanilla Ice Cream", "Whipped Cream (optional)", "Chocolate Shavings (optional)"], + }, + ]; + + const productsMap = new Map(rawProductsData.map(product => [product.id, product])); + + const handleProductClick = (productId: string) => { + const product = productsMap.get(productId); + if (product) { + alert( + `You clicked on ${product.name}!\n\nAdvantages: ${product.advantages.join(", ")}\n\nIngredients: ${product.ingredients.join(", ")}` + ); + } else { + alert(`Product with ID ${productId} not found.`); + } }; return ( @@ -160,53 +184,23 @@ export default function LandingPage() { useInvertedBackground={false} products={[ { - id: "p1", name: "Veg Maharaja Burger", price: "₹150", variant: "Signature", imageSrc: "http://img.b2bpic.net/free-photo/burger-menu-two-pax-with-soft-drinks_114579-2516.jpg", imageAlt: "Gourmet Veg Maharaja Burger", advantages: ["Satisfying & Wholesome", "Rich Indian Flavors", "Pure Vegetarian Delight", "Perfect for a Hearty Meal"], - ingredients: ["Large Veg Patty", "Fresh Lettuce", "Tomato Slices", "Onions", "Cheese Slice", "Special Maharaja Sauce", "Sesame Bun"], - onProductClick: () => handleProductClick({ - id: "p1", name: "Veg Maharaja Burger", price: "₹150", variant: "Signature", imageSrc: "http://img.b2bpic.net/free-photo/burger-menu-two-pax-with-soft-drinks_114579-2516.jpg", imageAlt: "Gourmet Veg Maharaja Burger", advantages: ["Satisfying & Wholesome", "Rich Indian Flavors", "Pure Vegetarian Delight", "Perfect for a Hearty Meal"], - ingredients: ["Large Veg Patty", "Fresh Lettuce", "Tomato Slices", "Onions", "Cheese Slice", "Special Maharaja Sauce", "Sesame Bun"] - }) + id: "p1", name: "Veg Maharaja Burger", price: "₹150", variant: "Signature", imageSrc: "http://img.b2bpic.net/free-photo/burger-menu-two-pax-with-soft-drinks_114579-2516.jpg", imageAlt: "Gourmet Veg Maharaja Burger", onProductClick: () => handleProductClick("p1") }, { - id: "p2", name: "Paneer Tikka Pizza", price: "₹200", variant: "Spicy Pure Veg", imageSrc: "http://img.b2bpic.net/free-photo/top-view-pizza-with-chicken-mushrooms-cherry-tomatoes-topped-with-urugula-rustic-table_141793-4264.jpg", imageAlt: "Paneer Tikka Pizza", advantages: ["Irresistible Fusion", "Spicy & Flavorful", "Hand-tossed Dough", "Protein-rich Paneer"], - ingredients: ["Freshly Baked Crust", "Tangy Pizza Sauce", "Mozzarella Cheese", "Marinated Paneer Tikka Cubes", "Capsicum", "Onions", "Coriander"], - onProductClick: () => handleProductClick({ - id: "p2", name: "Paneer Tikka Pizza", price: "₹200", variant: "Spicy Pure Veg", imageSrc: "http://img.b2bpic.net/free-photo/top-view-pizza-with-chicken-mushrooms-cherry-tomatoes-topped-with-urugula-rustic-table_141793-4264.jpg", imageAlt: "Paneer Tikka Pizza", advantages: ["Irresistible Fusion", "Spicy & Flavorful", "Hand-tossed Dough", "Protein-rich Paneer"], - ingredients: ["Freshly Baked Crust", "Tangy Pizza Sauce", "Mozzarella Cheese", "Marinated Paneer Tikka Cubes", "Capsicum", "Onions", "Coriander"] - }) + id: "p2", name: "Paneer Tikka Pizza", price: "₹200", variant: "Spicy Pure Veg", imageSrc: "http://img.b2bpic.net/free-photo/top-view-pizza-with-chicken-mushrooms-cherry-tomatoes-topped-with-urugula-rustic-table_141793-4264.jpg", imageAlt: "Paneer Tikka Pizza", onProductClick: () => handleProductClick("p2") }, { - id: "p3", name: "Cold Coffee Classic", price: "₹90", variant: "Refreshing", imageSrc: "http://img.b2bpic.net/free-photo/coffee-beans-black-background-with-cup-drink_114579-16652.jpg", imageAlt: "Classic Cold Coffee", advantages: ["Perfect Chill", "Energizing Boost", "Creamy & Smooth Texture", "Timeless Favorite"], - ingredients: ["Espresso Shot", "Chilled Milk", "Sugar Syrup", "Ice Cubes", "Whipped Cream (optional)", "Chocolate Drizzle (optional)"], - onProductClick: () => handleProductClick({ - id: "p3", name: "Cold Coffee Classic", price: "₹90", variant: "Refreshing", imageSrc: "http://img.b2bpic.net/free-photo/coffee-beans-black-background-with-cup-drink_114579-16652.jpg", imageAlt: "Classic Cold Coffee", advantages: ["Perfect Chill", "Energizing Boost", "Creamy & Smooth Texture", "Timeless Favorite"], - ingredients: ["Espresso Shot", "Chilled Milk", "Sugar Syrup", "Ice Cubes", "Whipped Cream (optional)", "Chocolate Drizzle (optional)"] - }) + id: "p3", name: "Cold Coffee Classic", price: "₹90", variant: "Refreshing", imageSrc: "http://img.b2bpic.net/free-photo/coffee-beans-black-background-with-cup-drink_114579-16652.jpg", imageAlt: "Classic Cold Coffee", onProductClick: () => handleProductClick("p3") }, { - id: "p4", name: "Crispy French Fries", price: "₹70", variant: "Perfect Snack", imageSrc: "http://img.b2bpic.net/free-photo/top-view-tasty-fried-potatoes-inside-plate-with-seasonings-dark-surface_140725-88252.jpg", imageAlt: "Crispy French Fries", advantages: ["Irresistibly Crunchy", "Perfect Side Snack", "Lightly Salted", "Golden Perfection"], - ingredients: ["Selected Potatoes", "Cooking Oil", "Salt", "Special Seasoning Blend"], - onProductClick: () => handleProductClick({ - id: "p4", name: "Crispy French Fries", price: "₹70", variant: "Perfect Snack", imageSrc: "http://img.b2bpic.net/free-photo/top-view-tasty-fried-potatoes-inside-plate-with-seasonings-dark-surface_140725-88252.jpg", imageAlt: "Crispy French Fries", advantages: ["Irresistibly Crunchy", "Perfect Side Snack", "Lightly Salted", "Golden Perfection"], - ingredients: ["Selected Potatoes", "Cooking Oil", "Salt", "Special Seasoning Blend"] - }) + id: "p4", name: "Crispy French Fries", price: "₹70", variant: "Perfect Snack", imageSrc: "http://img.b2bpic.net/free-photo/top-view-tasty-fried-potatoes-inside-plate-with-seasonings-dark-surface_140725-88252.jpg", imageAlt: "Crispy French Fries", onProductClick: () => handleProductClick("p4") }, { - id: "p5", name: "Veg Club Sandwich", price: "₹120", variant: "Hearty & Healthy", imageSrc: "http://img.b2bpic.net/free-photo/top-view-triangular-sandwiches-plate-with-cutlery-cucumber-slices_23-2148465154.jpg", imageAlt: "Pure Veg Club Sandwich", advantages: ["Layered Goodness", "Fresh & Filling", "Quick Meal Option", "Healthy Choice"], - ingredients: ["Toasted Bread Slices", "Cucumber", "Tomato", "Lettuce", "Cheese", "Veg Mayonnaise", "Green Chutney", "Boiled Potato Slices"], - onProductClick: () => handleProductClick({ - id: "p5", name: "Veg Club Sandwich", price: "₹120", variant: "Hearty & Healthy", imageSrc: "http://img.b2bpic.net/free-photo/top-view-triangular-sandwiches-plate-with-cutlery-cucumber-slices_23-2148465154.jpg", imageAlt: "Pure Veg Club Sandwich", advantages: ["Layered Goodness", "Fresh & Filling", "Quick Meal Option", "Healthy Choice"], - ingredients: ["Toasted Bread Slices", "Cucumber", "Tomato", "Lettuce", "Cheese", "Veg Mayonnaise", "Green Chutney", "Boiled Potato Slices"] - }) + id: "p5", name: "Veg Club Sandwich", price: "₹120", variant: "Hearty & Healthy", imageSrc: "http://img.b2bpic.net/free-photo/top-view-triangular-sandwiches-plate-with-cutlery-cucumber-slices_23-2148465154.jpg", imageAlt: "Pure Veg Club Sandwich", onProductClick: () => handleProductClick("p5") }, { - id: "p6", name: "Chocolate Shake", price: "₹100", variant: "Sweet Indulgence", imageSrc: "http://img.b2bpic.net/free-photo/iced-coffees-with-whipped-cream-chocolate_1150-18521.jpg", imageAlt: "Rich Chocolate Shake", advantages: ["Decadent & Sweet", "Rich Chocolate Flavor", "Refreshing Treat", "Smooth & Thick"], - ingredients: ["Milk", "Chocolate Syrup", "Cocoa Powder", "Vanilla Ice Cream", "Whipped Cream (optional)", "Chocolate Shavings (optional)"], - onProductClick: () => handleProductClick({ - id: "p6", name: "Chocolate Shake", price: "₹100", variant: "Sweet Indulgence", imageSrc: "http://img.b2bpic.net/free-photo/iced-coffees-with-whipped-cream-chocolate_1150-18521.jpg", imageAlt: "Rich Chocolate Shake", advantages: ["Decadent & Sweet", "Rich Chocolate Flavor", "Refreshing Treat", "Smooth & Thick"], - ingredients: ["Milk", "Chocolate Syrup", "Cocoa Powder", "Vanilla Ice Cream", "Whipped Cream (optional)", "Chocolate Shavings (optional)"] - }) - }, + id: "p6", name: "Chocolate Shake", price: "₹100", variant: "Sweet Indulgence", imageSrc: "http://img.b2bpic.net/free-photo/iced-coffees-with-whipped-cream-chocolate_1150-18521.jpg", imageAlt: "Rich Chocolate Shake", onProductClick: () => handleProductClick("p6") + } ]} title="Our Full Menu" description="Explore our delicious range of pure vegetarian delights, from savory snacks to refreshing beverages. All prepared with the freshest ingredients."