"use client"; import { useState } from "react"; import { ShoppingCart, Search, Phone, Menu, X, Clock, Star, MapPin, ChevronDown } from "lucide-react"; const PizzaShop = () => { const [activeCategory, setActiveCategory] = useState("all"); const [cartItems, setCartItems] = useState([]); const [isCartOpen, setIsCartOpen] = useState(false); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); // Data pizza const pizzas = [ { id: 1, name: "Pizza Margherita", description: "Saus tomat segar, mozzarella, dan daun basil", price: 50000, shape: "bundar", image: "https://storage.googleapis.com/workspace-0f70711f-8b4e-4d94-86f1-2a93ccde5887/image/bb033d85-e8bb-4be8-b3a3-c8602a713a3b.png", toppings: ["Keju", "Basil"] }, { id: 2, name: "Pepperoni Classic", description: "Pepperoni yang melimpah dengan keju mozzarella", price: 55000, shape: "kotak", image: "https://placehold.co/300x300", toppings: ["Keju", "Pepperoni"] }, { id: 3, name: "Supreme Deluxe", description: "Pepperoni, sosis, jamur, paprika, dan bawang", price: 60000, shape: "bundar", image: "https://placehold.co/300x300", toppings: ["Keju", "Pepperoni", "Jamur", "Paprika"] }, { id: 4, name: "BBQ Chicken", description: "Ayam panggang dengan saus BBQ dan bawang merah", price: 58000, shape: "persegi panjang", image: "https://placehold.co/300x300", toppings: ["Keju", "Ayam", "Saus BBQ"] }, { id: 5, name: "Vegetarian", description: "Jamu, paprika, zaitun, tomat, dan bawang", price: 52000, shape: "bundar", image: "https://placehold.co/300x300", toppings: ["Keju", "Jamur", "Paprika", "Zaitun"] }, { id: 6, name: "Meat Lovers", description: "Pepperoni, sosis, ham, dan daging sapi", price: 60000, shape: "kotak", image: "https://placehold.co/300x300", toppings: ["Keju", "Pepperoni", "Sosis", "Ham"] } ]; const categories = [ { id: "all", name: "Semua Menu" }, { id: "bundar", name: "Bundar" }, { id: "kotak", name: "Kotak" }, { id: "persegi panjang", name: "Persegi Panjang" } ]; const filteredPizzas = activeCategory === "all" ? pizzas : pizzas.filter(pizza => pizza.shape === activeCategory); const addToCart = (pizza) => { setCartItems([...cartItems, pizza]); }; const formatPrice = (price) => { return new Intl.NumberFormat('id-ID', { style: 'currency', currency: 'IDR', minimumFractionDigits: 0 }).format(price); }; const getShapeIcon = (shape) => { switch(shape) { case "bundar": return "🟠"; case "kotak": return "⬜"; case "persegi panjang": return "⬛"; default: return "🍕"; } }; return (
{/* Header */}

PizzaMania

{/* Desktop Navigation */} {/* Right side icons */}
{/* Mobile Menu */} {isMobileMenuOpen && (

Menu

)} {/* Shopping Cart Sidebar */} {isCartOpen && (

Keranjang Belanja

{cartItems.length === 0 ? (

Keranjang Anda kosong

) : (
{cartItems.map((item, index) => (

{item.name}

{formatPrice(item.price)}

))}
Total: {formatPrice(cartItems.reduce((total, item) => total + item.price, 0))}
)}
)} {/* Hero Section */}

Pizza Lezat dengan Harga Terjangkau

Dari Rp 50.000 - Rasakan Kenikmatan dalam Setiap Gigitan

Lihat Menu
{/* Menu Section */} {/* About Section */}

Mengapa Memilih PizzaMania?

Pengiriman Cepat

Pesanan Anda akan sampai dalam waktu 30 menit

Bahan Berkualitas

Menggunakan bahan-bahan pilihan terbaik

Area Pengiriman Luas

Melayani pengiriman ke seluruh kota

{/* CTA Section */}

Tunggu Apa Lagi?

Pesan pizza favorit Anda sekarang dan nikmati promo spesial!

{/* Footer */}
); }; export default PizzaShop;