import { AddressSummary } from '@components/common/customer/address/AddressSummary.js'; import { Button } from '@components/common/ui/Button.js'; import { _ } from '@evershop/evershop/lib/locale/translate/_'; import React from 'react'; interface CustomerInfoProps { order: { orderNumber: string; customerFullName: string; customerEmail: string; paymentMethodName: string; noShippingRequired: boolean; shippingAddress: { fullName: string; postcode: string; telephone: string; country: { name: string; code: string; }; province: { name: string; code: string; }; city: string; address1: string; address2: string; }; billingAddress: { fullName: string; postcode: string; telephone: string; country: { name: string; code: string; }; province: { name: string; code: string; }; city: string; address1: string; address2: string; }; }; } export default function CustomerInfo({ order: { orderNumber, customerFullName, customerEmail, paymentMethodName, noShippingRequired, shippingAddress, billingAddress } }: CustomerInfoProps) { return (

{_('Order #${orderNumber}', { orderNumber })}
{_('Thank you ${name}!', { name: customerFullName || billingAddress?.fullName })}

{_('Contact information')}

{customerFullName || billingAddress?.fullName}
{customerEmail}

{_('Shipping Address')}

{noShippingRequired ? ( _('No shipping required') ) : ( )}

{_('Payment Method')}

{paymentMethodName}

{_('Billing Address')}

); } export const layout = { areaId: 'checkoutSuccessPageLeft', sortOrder: 10 }; export const query = ` query Query { order (uuid: getContextValue('orderId')) { orderNumber customerFullName customerEmail paymentMethodName noShippingRequired shippingNote shippingAddress { fullName postcode telephone country { name code } province { name code } city address1 address2 } billingAddress { fullName postcode telephone country { name code } province { name code } city address1 address2 } } } `;