diff --git a/src/app/order/page.tsx b/src/app/order/page.tsx index 1754b65..5e868e6 100644 --- a/src/app/order/page.tsx +++ b/src/app/order/page.tsx @@ -1,11 +1,18 @@ "use client"; -import Link from "next/link"; +import { useState } from "react"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered"; -import ProductCardFour from "@/components/sections/product/ProductCardFour"; +import HeroSplit from "@/components/sections/hero/HeroSplit"; import FooterMedia from "@/components/sections/footer/FooterMedia"; -import { Flame } from "lucide-react"; +import ProductCartItem from "@/components/ecommerce/cart/ProductCartItem"; +import { + CreditCard, + Heart, + ShoppingCart, + Lock, + Check, +} from "lucide-react"; export default function OrderPage() { const navItems = [ @@ -15,47 +22,329 @@ export default function OrderPage() { { name: "Gallery", id: "gallery" }, { name: "Reviews", id: "reviews" }, { name: "Locations", id: "locations" }, + { name: "Order Online", id: "order" }, ]; + const [cart, setCart] = useState< + Array<{ + id: string; + name: string; + variants?: string[]; + price: string; + quantity: number; + imageSrc: string; + imageAlt?: string; + }> + >([ + { + id: "jerk-chicken", name: "Jerk Chicken Platter", price: "$15.95", quantity: 1, + imageSrc: + "http://img.b2bpic.net/free-photo/from-shrimps-batter-with-red-rice-greens-white-plate_176474-2654.jpg?_wi=1", imageAlt: "Jerk chicken platter", variants: ["Full Rack"], + }, + { + id: "curry-shrimp", name: "Curry Shrimp Platter", price: "$16.95", quantity: 1, + imageSrc: + "http://img.b2bpic.net/free-photo/side-view-fried-eggs-with-shrimps-vegetables-pan-served-with-sauces_140725-11952.jpg?_wi=1", imageAlt: "Curry shrimp platter", variants: ["Fresh Daily"], + }, + ]); + + const [paymentMethod, setPaymentMethod] = useState< + "credit-card" | "apple-pay" | "paypal" + >("credit-card"); + const [orderStage, setOrderStage] = useState< + "cart" | "checkout" | "confirmation" + >("cart"); + + const handleQuantityChange = (id: string, quantity: number) => { + setCart((prev) => + prev.map((item) => + item.id === id ? { ...item, quantity } : item + ) + ); + }; + + const handleRemove = (id: string) => { + setCart((prev) => prev.filter((item) => item.id !== id)); + }; + + const subtotal = cart.reduce( + (sum, item) => + sum + parseFloat(item.price.replace("$", "")) * item.quantity, + 0 + ); + const tax = subtotal * 0.07; + const total = subtotal + tax; + const footerColumns = [ { - title: "Quick Links", - items: [ + title: "Quick Links", items: [ { label: "Home", href: "/" }, { label: "Menu", href: "/menu" }, - { label: "Gallery", href: "/gallery" }, - { label: "Reviews", href: "/reviews" }, + { label: "Gallery", href: "/" }, + { label: "Reviews", href: "/" }, ], }, { - title: "Order & Contact", - items: [ + title: "Order & Contact", items: [ { label: "Order Online", href: "/order" }, { label: "Call Us", href: "tel:2397850423" }, { label: "Locations & Hours", href: "/locations" }, - { label: "Contact", href: "/contact" }, + { label: "Contact", href: "/" }, ], }, { - title: "Connect With Us", - items: [ + title: "Connect With Us", items: [ { label: "Facebook", href: "https://facebook.com/caribbeanflair" }, - { label: "About Us", href: "/about" }, - { label: "Privacy Policy", href: "#privacy" }, - { label: "Terms of Service", href: "#terms" }, + { label: "About Us", href: "/" }, + { label: "Privacy Policy", href: "/" }, + { label: "Terms of Service", href: "/" }, ], }, { - title: "Located In", - items: [ - { label: "801 Leeland Heights Blvd W", href: "#map" }, - { label: "Lehigh Acres, FL 33936", href: "#map" }, - { label: "Open Until 9PM", href: "/locations" }, - { label: "Delivery Available", href: "/order" }, + title: "Located In", items: [ + { label: "801 Leeland Heights Blvd W", href: "/" }, + { label: "Lehigh Acres, FL 33936", href: "/" }, + { label: "Open Until 9PM", href: "/" }, + { label: "Delivery Available", href: "/" }, ], }, ]; + if (orderStage === "confirmation") { + return ( + + + +
+
+
+
+ +
+
+

Order Confirmed!

+

+ Thank you for your order. Your Caribbean Flair meal will be ready in approximately 20 minutes. +

+
+

Order #: CF-2025-001234

+

Total: ${total.toFixed(2)}

+

Payment: {paymentMethod === "credit-card" ? "Credit Card" : paymentMethod === "apple-pay" ? "Apple Pay" : "PayPal"}

+
+
+ + + Back to Home + +
+
+
+ + +
+ ); + } + + if (orderStage === "checkout") { + return ( + + + +
+
+

Secure Checkout

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

Order Summary

+
+ {cart.map((item) => ( +
+ + {item.name} × {item.quantity} + + + ${(parseFloat(item.price.replace("$", "")) * item.quantity).toFixed(2)} + +
+ ))} +
+
+
+ Subtotal: + ${subtotal.toFixed(2)} +
+
+ Tax (7%): + ${tax.toFixed(2)} +
+
+ Total: + ${total.toFixed(2)} +
+
+
+ + {/* Payment Methods */} +
+

+ + Secure Payment +

+ + {/* Credit Card */} +
setPaymentMethod("credit-card")} + > +
+ + Credit Card +
+ {paymentMethod === "credit-card" && ( +
+ +
+ + +
+
+ )} +
+ + {/* Apple Pay */} +
setPaymentMethod("apple-pay")} + > +
+ 🍎 + Apple Pay +
+
+ + {/* PayPal */} +
setPaymentMethod("paypal")} + > +
+ PP + PayPal +
+
+
+ + {/* Action Buttons */} +
+ + +
+
+
+ + +
+ ); + } + return ( + {/* Navbar */} -
- + setOrderStage("checkout"), }, ]} buttonAnimation="slide-up" - textboxLayout="default" - gridVariant="three-columns-all-equal-width" - animationType="slide-up" - useInvertedBackground={false} - products={[ - { - id: "jerk-chicken", - name: "Jerk Chicken Platter", - price: "$15.95", - variant: "Full Rack", - imageSrc: "http://img.b2bpic.net/free-photo/from-shrimps-batter-with-red-rice-greens-white-plate_176474-2654.jpg?_wi=3", - imageAlt: "Jerk chicken grilled on foil with spices", - onProductClick: undefined, - onFavorite: undefined, - isFavorited: false, - }, - { - id: "curry-shrimp", - name: "Curry Shrimp Platter", - price: "$16.95", - variant: "Fresh Daily", - imageSrc: "http://img.b2bpic.net/free-photo/side-view-fried-eggs-with-shrimps-vegetables-pan-served-with-sauces_140725-11952.jpg?_wi=4", - imageAlt: "Curry shrimp over rice and peas", - onProductClick: undefined, - onFavorite: undefined, - isFavorited: false, - }, - { - id: "conch-fritters", - name: "Conch Fritters Combo", - price: "$12.95", - variant: "6 Pieces", - imageSrc: "http://img.b2bpic.net/free-photo/chicken-nuggets-served-with-french-fries-sauces_140725-5759.jpg?_wi=3", - imageAlt: "Golden conch fritters with dipping sauce", - onProductClick: undefined, - onFavorite: undefined, - isFavorited: false, - }, - ]} + imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3Afn0reuidgadYlHif4J2xHlmq8/uploaded-1773849790665-2gw0wih3.jpg" + imageAlt="Caribbean Flair food display" + mediaAnimation="opacity" + imagePosition="right" + ariaLabel="Order online hero section" />
-