diff --git a/src/app/checkout/page.tsx b/src/app/checkout/page.tsx new file mode 100644 index 0000000..2b6ce84 --- /dev/null +++ b/src/app/checkout/page.tsx @@ -0,0 +1,331 @@ +"use client"; + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleApple from "@/components/navbar/NavbarStyleApple/NavbarStyleApple"; +import ContactCTA from "@/components/sections/contact/ContactCTA"; +import FooterBaseCard from "@/components/sections/footer/FooterBaseCard"; +import { MessageSquare } from "lucide-react"; +import { useState } from "react"; + +export default function CheckoutPage() { + const [formData, setFormData] = useState({ + firstName: "", lastName: "", email: "", phone: "", address: "", city: "", state: "", zipCode: "", cardNumber: "", expiryDate: "", cvv: ""}); + + const [orderPlaced, setOrderPlaced] = useState(false); + + const navItems = [ + { name: "Home", id: "/" }, + { name: "Menu", id: "/menu" }, + { name: "Order", id: "/order" }, + { name: "Locations", id: "/locations" }, + { name: "Promotions", id: "/promotions" }, + ]; + + const footerColumns = [ + { + title: "Quick Links", items: [ + { label: "Home", href: "/" }, + { label: "Menu", href: "/menu" }, + { label: "Order Online", href: "/order" }, + { label: "Locations", href: "/locations" }, + ], + }, + { + title: "Company", items: [ + { label: "About Us", href: "/about" }, + { label: "Careers", href: "/careers" }, + { label: "Blog", href: "/blog" }, + { label: "Press", href: "/press" }, + ], + }, + { + title: "Support", items: [ + { label: "Contact", href: "/contact" }, + { label: "FAQ", href: "#faq" }, + { label: "Track Order", href: "/track" }, + { label: "Returns", href: "/returns" }, + ], + }, + { + title: "Social", items: [ + { label: "Facebook", href: "https://facebook.com/mcdonalds" }, + { label: "Instagram", href: "https://instagram.com/mcdonalds" }, + { label: "Twitter", href: "https://twitter.com/mcdonalds" }, + { label: "YouTube", href: "https://youtube.com/mcdonalds" }, + ], + }, + ]; + + const handleChange = (e: React.ChangeEvent) => { + const { name, value } = e.target; + setFormData(prev => ({ + ...prev, + [name]: value + })); + }; + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + setOrderPlaced(true); + setTimeout(() => { + window.location.href = "/"; + }, 3000); + }; + + return ( + + + +
+
+ {orderPlaced ? ( +
+
+
+ + + +
+

Order Placed Successfully!

+

Thank you for your order.

+

Redirecting to home page...

+
+
+ ) : ( +
+

Checkout

+

Complete your order by providing your details and payment information.

+ +
+ {/* Personal Information */} +
+

Personal Information

+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + {/* Delivery Address */} +
+

Delivery Address

+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + {/* Payment Information */} +
+

Payment Information

+
+ + +
+
+
+ + +
+
+ + +
+
+
+ + {/* Order Summary */} +
+

Order Summary

+
+
+ Subtotal: + $24.97 +
+
+ Delivery Fee: + $3.99 +
+
+ Tax: + $2.23 +
+
+ Total: + $31.19 +
+
+
+ + {/* Submit Button */} + +
+
+ )} +
+
+ +
+ +
+ + +
+ ); +} \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 2a38028..3a7f5f2 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -111,8 +111,7 @@ export default function HomePage() { const productsWithHandlers = products.map((product) => ({ ...product, onProductClick: () => { - setSelectedProduct(product.name); - setIsModalOpen(true); + window.location.href = "/checkout"; }, })); @@ -293,33 +292,6 @@ export default function HomePage() { copyrightText="© 2025 McDonald's Corporation. All rights reserved." /> - - {/* Product Details Modal */} - {isModalOpen && ( -
setIsModalOpen(false)} - > -
e.stopPropagation()} - > -

Product Details

-

- You selected: {selectedProduct} -

-

- This is a product details modal. In a real application, this would display detailed information about the selected item. -

- -
-
- )} ); } \ No newline at end of file