From c69a686bf815041cea88335541b7783213754215 Mon Sep 17 00:00:00 2001 From: bender Date: Mon, 9 Mar 2026 09:38:03 +0000 Subject: [PATCH] Switch to version 1: remove src/app/checkout/page.tsx --- src/app/checkout/page.tsx | 264 -------------------------------------- 1 file changed, 264 deletions(-) delete mode 100644 src/app/checkout/page.tsx diff --git a/src/app/checkout/page.tsx b/src/app/checkout/page.tsx deleted file mode 100644 index 6570063..0000000 --- a/src/app/checkout/page.tsx +++ /dev/null @@ -1,264 +0,0 @@ -'use client'; - -import { useState } from 'react'; -import { ThemeProvider } from '@/components/theme-provider'; -import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen'; -import ButtonHoverBubble from '@/components/button/ButtonHoverBubble'; -import Textarea from '@/components/form/Textarea'; - -const navItems = [ - { name: 'Home', id: '/' }, - { name: 'Shop', id: '/shop' }, - { name: 'Cart', id: '/cart' }, - { name: 'Checkout', id: '/checkout' }, -]; - -interface OrderItem { - id: string; - name: string; - price: number; - quantity: number; -} - -interface FormData { - firstName: string; - lastName: string; - email: string; - address: string; - city: string; - postalCode: string; - notes: string; -} - -export default function CheckoutPage() { - const [formData, setFormData] = useState({ - firstName: '', - lastName: '', - email: '', - address: '', - city: '', - postalCode: '', - notes: '', - }); - - const [orderPlaced, setOrderPlaced] = useState(false); - - // Sample order data - const orderItems: OrderItem[] = [ - { id: '1', name: 'Premium Headphones', price: 199.99, quantity: 1 }, - { id: '2', name: 'Wireless Mouse', price: 49.99, quantity: 2 }, - ]; - - const subtotal = orderItems.reduce((sum, item) => sum + item.price * item.quantity, 0); - const tax = subtotal * 0.1; - const shipping = 10.0; - const total = subtotal + tax + shipping; - - const handleInputChange = (e: React.ChangeEvent) => { - const { name, value } = e.target; - setFormData(prev => ({ ...prev, [name]: value })); - }; - - const handleSubmit = (e: React.FormEvent) => { - e.preventDefault(); - // Simulate order placement - setOrderPlaced(true); - }; - - if (orderPlaced) { - return ( - - -
-
-
-
- -
-

Order Confirmed!

-

- Thank you for your order. A confirmation email has been sent to {formData.email} -

-
-
-

Order Details

-
-

Name: {formData.firstName} {formData.lastName}

-

Email: {formData.email}

-

Address: {formData.address}, {formData.city} {formData.postalCode}

-

Total: ${total.toFixed(2)}

-
-
- -
-
-
- ); - } - - return ( - - -
-
-

Checkout

- -
- {/* Checkout Form */} -
-
-
-

Shipping Information

-
- - -
- - -
- - -
-
- -
-

Order Notes

-