Skip to content

Commit

Permalink
Small edits to shipping route
Browse files Browse the repository at this point in the history
  • Loading branch information
annacarey committed Jan 23, 2021
1 parent cded9c6 commit 8a1c82f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/v2/Apps/Order/Routes/Shipping/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ 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"
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
Expand Down Expand Up @@ -106,9 +105,9 @@ export class ShippingRoute extends Component<ShippingProps, ShippingState> {
}

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" ||
Expand All @@ -119,10 +118,10 @@ export class ShippingRoute extends Component<ShippingProps, ShippingState> {
}

get startingAddress() {
const defaultAddress = this.defaultAddress
if (defaultAddress) {
const defaultSavedAddress = this.defaultAddress
if (defaultSavedAddress) {
const startingAddress = this.convertShippingAddressForExchange(
defaultAddress
defaultSavedAddress
)
return startingAddress
} else {
Expand Down Expand Up @@ -443,7 +442,6 @@ export class ShippingRoute extends Component<ShippingProps, ShippingState> {
}

render() {
console.log(this.state)
const { order, isCommittingMutation } = this.props
const {
address,
Expand Down

0 comments on commit 8a1c82f

Please sign in to comment.