Bob AI: Populate src/pages/ShoppingCartPage.tsx (snippet builder, 2 sections)
This commit is contained in:
@@ -1,105 +1,26 @@
|
||||
import React from "react";
|
||||
import { routes } from "@/routes";
|
||||
import NavbarCentered from "@/components/ui/NavbarCentered";
|
||||
import ProductQuantityCards from "@/components/sections/product/ProductQuantityCards";
|
||||
import ContactSplitForm from "@/components/sections/contact/ContactSplitForm";
|
||||
import FooterSimple from "@/components/sections/footer/FooterSimple";
|
||||
|
||||
const cartItems = [
|
||||
{
|
||||
name: "16 Piece Hot Wings Bucket",
|
||||
price: "85,000 UZS",
|
||||
imageSrc: "https://images.unsplash.com/photo-1626645738196-c2a7c87a8f58?q=80&w=800&auto=format&fit=crop",
|
||||
onAddToCart: () => console.log("Update quantity")
|
||||
},
|
||||
{
|
||||
name: "Zinger Burger Combo",
|
||||
price: "45,000 UZS",
|
||||
imageSrc: "https://images.unsplash.com/photo-1568901346375-23c9450c58cd?q=80&w=800&auto=format&fit=crop",
|
||||
onAddToCart: () => console.log("Update quantity")
|
||||
},
|
||||
{
|
||||
name: "Large French Fries",
|
||||
price: "18,000 UZS",
|
||||
imageSrc: "https://images.unsplash.com/photo-1576107232684-1279f3908594?q=80&w=800&auto=format&fit=crop",
|
||||
onAddToCart: () => console.log("Update quantity")
|
||||
}
|
||||
];
|
||||
|
||||
const checkoutInputs = [
|
||||
{
|
||||
name: "fullName",
|
||||
type: "text",
|
||||
placeholder: "Full Name",
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: "phone",
|
||||
type: "tel",
|
||||
placeholder: "Phone Number (+998...)",
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: "address",
|
||||
type: "text",
|
||||
placeholder: "Delivery Address (Urganch)",
|
||||
required: true
|
||||
}
|
||||
];
|
||||
|
||||
export default function ShoppingCartPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-background text-foreground flex flex-col">
|
||||
<NavbarCentered
|
||||
logo="KFC Urganch"
|
||||
navItems={routes.map((r) => ({ name: r.label, href: r.path }))}
|
||||
ctaButton={{ text: "Back to Menu", href: "/menu" }}
|
||||
/>
|
||||
|
||||
<main className="flex-1 pt-24">
|
||||
<ProductQuantityCards
|
||||
tag="Your Cart"
|
||||
title="Review Your Order"
|
||||
description="Make sure you have all your favorites before checking out. Finger lickin' good!"
|
||||
products={cartItems}
|
||||
/>
|
||||
|
||||
<ContactSplitForm
|
||||
tag="Checkout"
|
||||
title="Delivery Details"
|
||||
description="Enter your information for fast delivery anywhere in Urganch."
|
||||
inputs={checkoutInputs}
|
||||
textarea={{ name: "notes", placeholder: "Special instructions for the rider...", rows: 3 }}
|
||||
buttonText="Place Order - 148,000 UZS"
|
||||
imageSrc="https://images.unsplash.com/photo-1526367790999-0150786686a2?q=80&w=800&auto=format&fit=crop"
|
||||
/>
|
||||
</main>
|
||||
|
||||
<FooterSimple
|
||||
brand="KFC Urganch"
|
||||
columns={[
|
||||
{
|
||||
title: "Menu",
|
||||
items: [
|
||||
{ label: "Buckets", href: "/menu" },
|
||||
{ label: "Burgers", href: "/menu" },
|
||||
{ label: "Snacks", href: "/menu" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Support",
|
||||
items: [
|
||||
{ label: "Contact Us", href: "/contact" },
|
||||
{ label: "Delivery Info", href: "/faq" }
|
||||
]
|
||||
}
|
||||
]}
|
||||
copyright="© 2024 KFC Urganch. All rights reserved."
|
||||
links={[
|
||||
{ label: "Privacy Policy", href: "/privacy" },
|
||||
{ label: "Terms of Service", href: "/terms" }
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<>
|
||||
<div data-webild-section="ProductQuantityCards"><ProductQuantityCards
|
||||
tag="Savat"
|
||||
title="Sizning buyurtmangiz"
|
||||
description="Tanlangan mazali tovuqlar va ichimliklarni tekshiring. Barchasi to'g'ri bo'lsa, xaridni davom ettiring."
|
||||
primaryButton={{"text":"Rasmiylashtirish","href":"/checkout"}}
|
||||
secondaryButton={{"text":"Menyuga qaytish","href":"/menu"}}
|
||||
products={[{"name":"Katta Basket","price":"85 000 UZS","imageSrc":"https://img.freepik.com/free-photo/crispy-fried-chicken-bucket_144627-12051.jpg"},{"name":"Zinger Burger","price":"28 000 UZS","imageSrc":"https://img.freepik.com/free-photo/delicious-chicken-burger_144627-8714.jpg"},{"name":"Katta Fri","price":"15 000 UZS","imageSrc":"https://img.freepik.com/free-photo/french-fries-paper-box_144627-23426.jpg"}]}
|
||||
/></div>
|
||||
<div data-webild-section="ContactSplitForm"><ContactSplitForm
|
||||
tag="Buyurtma berish"
|
||||
title="Yetkazib berish ma'lumotlari"
|
||||
description="Buyurtmangizni tez va issiq holatda yetkazib berishimiz uchun quyidagi ma'lumotlarni to'ldiring."
|
||||
inputs={[{"name":"fullName","type":"text","placeholder":"Ismingiz","required":true},{"name":"phone","type":"tel","placeholder":"Telefon raqamingiz","required":true},{"name":"address","type":"text","placeholder":"To'liq manzil","required":true}]}
|
||||
textarea={{"name":"comments","placeholder":"Qo'shimcha izohlar (mo'ljal, qavat...)","rows":4,"required":false}}
|
||||
buttonText="Tasdiqlash"
|
||||
imageSrc="https://img.freepik.com/premium-photo/bucket-fried-chicken-with-french-fries-it_1022967-18342.jpg"
|
||||
/></div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user