diff --git a/app/account/orders/[id]/page.tsx b/app/account/orders/[id]/page.tsx index da9f6e1ed..ccf2938e8 100644 --- a/app/account/orders/[id]/page.tsx +++ b/app/account/orders/[id]/page.tsx @@ -194,15 +194,15 @@ function OrderDetails({ order }: { order: Order }) {
- {order.shippingAddress.firstName} {order.shippingAddress.lastName} + {order.shippingAddress!.firstName} {order.shippingAddress!.lastName} - {order.shippingAddress.address1} - {order.shippingAddress.address2 && {order.shippingAddress.address2}} + {order.shippingAddress!.address1} + {order.shippingAddress!.address2 && {order.shippingAddress!.address2}} - {order.shippingAddress.city} {order.shippingAddress.provinceCode}{' '} - {order.shippingAddress.zip} + {order.shippingAddress!.city} {order.shippingAddress!.provinceCode}{' '} + {order.shippingAddress!.zip} - {order.shippingAddress.country} + {order.shippingAddress!.country}
@@ -219,15 +219,15 @@ function OrderDetails({ order }: { order: Order }) {
- {order.billingAddress.firstName} {order.billingAddress.lastName} + {order.billingAddress!.firstName} {order.billingAddress!.lastName} - {order.billingAddress.address1} - {order.billingAddress.address2 && {order.billingAddress.address2}} + {order.billingAddress!.address1} + {order.billingAddress!.address2 && {order.billingAddress!.address2}} - {order.billingAddress.city} {order.billingAddress.provinceCode}{' '} - {order.billingAddress.zip} + {order.billingAddress!.city} {order.billingAddress!.provinceCode}{' '} + {order.billingAddress!.zip} - {order.billingAddress.country} + {order.billingAddress!.country}
@@ -270,8 +270,8 @@ function OrderSummary({ order }: { order: Order }) { Subtotal
@@ -293,8 +293,8 @@ function OrderSummary({ order }: { order: Order }) {
diff --git a/lib/shopify/types.ts b/lib/shopify/types.ts index 95a07c76f..af0302ac4 100644 --- a/lib/shopify/types.ts +++ b/lib/shopify/types.ts @@ -136,13 +136,13 @@ export type Order = { fulfillments: Fulfillment[]; transactions: Transaction[]; lineItems: LineItem[]; - shippingAddress: Address; - billingAddress: Address; + shippingAddress?: Address; + billingAddress?: Address; /** the price of all line items, excluding taxes and surcharges */ - subtotal: Money; - totalShipping: Money; - totalTax: Money; - totalPrice: Money; + subtotal?: Money; + totalShipping?: Money; + totalTax?: Money; + totalPrice?: Money; shippingMethod?: { name: string; price: Money; @@ -283,14 +283,6 @@ type ShopifyImage = { width: number; }; -type ShopifyFulfillmentEventConnection = { - edges: ShopifyFulfillmentEventEdge[]; -}; - -type ShopifyFulfillmentEventEdge = { - node: ShopifyFulfillmentEvent; -}; - type ShopifyFulfillmentEvent = { status: string; happenedAt: string;