From 8a1c82ff437377cfb5c0c40a1ab1323783c8043e Mon Sep 17 00:00:00 2001 From: Anna Carey Date: Fri, 22 Jan 2021 17:35:05 -0700 Subject: [PATCH] Small edits to shipping route --- src/v2/Apps/Order/Routes/Shipping/index.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/v2/Apps/Order/Routes/Shipping/index.tsx b/src/v2/Apps/Order/Routes/Shipping/index.tsx index 174ee67c30c..e8d9a3e81c4 100644 --- a/src/v2/Apps/Order/Routes/Shipping/index.tsx +++ b/src/v2/Apps/Order/Routes/Shipping/index.tsx @@ -50,7 +50,7 @@ import { emptyAddress, } from "v2/Components/AddressForm" import { Router } from "found" -import { pick } from "lodash" +import { pick, omit } from "lodash" import React, { Component } from "react" import { RelayProp, createFragmentContainer, graphql } from "react-relay" import { get } from "v2/Utils/get" @@ -58,7 +58,6 @@ import createLogger from "v2/Utils/logger" import { Media } from "v2/Utils/Responsive" import { BuyerGuarantee } from "../../Components/BuyerGuarantee" import { Shipping_me } from "v2/__generated__/Shipping_me.graphql" -import { omit } from "lodash" export interface ShippingProps { order: Shipping_order @@ -106,9 +105,9 @@ export class ShippingRoute extends Component { } get startingPhoneNumber() { - const defaultPhoneNumber = this.defaultAddress?.phoneNumber - if (defaultPhoneNumber) { - return defaultPhoneNumber + const defaultSavedPhoneNumber = this.defaultAddress?.phoneNumber + if (defaultSavedPhoneNumber) { + return defaultSavedPhoneNumber } else { return this.props.order.requestedFulfillment && (this.props.order.requestedFulfillment.__typename === "CommerceShip" || @@ -119,10 +118,10 @@ export class ShippingRoute extends Component { } get startingAddress() { - const defaultAddress = this.defaultAddress - if (defaultAddress) { + const defaultSavedAddress = this.defaultAddress + if (defaultSavedAddress) { const startingAddress = this.convertShippingAddressForExchange( - defaultAddress + defaultSavedAddress ) return startingAddress } else { @@ -443,7 +442,6 @@ export class ShippingRoute extends Component { } render() { - console.log(this.state) const { order, isCommittingMutation } = this.props const { address,