import { AddressSummary } from '@components/common/customer/address/AddressSummary.js'; import { Card, CardContent, CardHeader, CardTitle } from '@components/common/ui/Card.js'; import React from 'react'; interface CustomerProps { order: { customerFullName: string; customerEmail: string; customerUrl?: string; noShippingRequired: boolean; shippingAddress: { fullName: string; city: string; address1: string; address2?: string; postcode: string; telephone: string; province: { code: string; name: string; }; country: { code: string; name: string; }; }; billingAddress: { fullName: string; city: string; address1: string; address2?: string; postcode: string; telephone: string; province: { code: string; name: string; }; country: { code: string; name: string; }; }; }; } export default function Customer({ order: { noShippingRequired, shippingAddress, billingAddress, customerFullName, customerEmail, customerUrl } }: CustomerProps) { return ( Customer Information {customerUrl && ( {customerFullName} )} {!customerUrl && {customerEmail} (Guest Checkout)} Contact Information
{customerEmail}
{shippingAddress?.telephone && (
{shippingAddress.telephone}
)}
Shipping Address {!noShippingRequired && } {noShippingRequired && ( {'No shipping required'} )} Billing address
); } export const layout = { areaId: 'rightSide', sortOrder: 15 }; export const query = ` query Query { order(uuid: getContextValue("orderId")) { customerFullName customerEmail customerUrl noShippingRequired shippingAddress { fullName city address1 address2 postcode telephone province { code name } country { code name } } billingAddress { fullName city address1 address2 postcode telephone province { code name } country { code name } } } } `;