♻️ enhan: flow input customer info at checkout

:%s
This commit is contained in:
lytrankieio123
2021-10-20 16:03:30 +07:00
parent 558b0a5546
commit d5eade99b4
5 changed files with 20 additions and 8 deletions

View File

@@ -79,8 +79,7 @@ const CheckoutInfo = ({ onViewCart }: CheckoutInfoProps) => {
const getNote = (id: CheckoutStep) => {
switch (id) {
case CheckoutStep.CustomerInfo:
// console.log("order info; ", order?.customer)
if (order?.customer) {
if (order?.customer?.emailAddress) {
return `${order?.customer?.firstName} ${order?.customer?.lastName}, ${order?.customer?.emailAddress}`
} else if (customer) {
return `${customer.firstName} ${customer.lastName}, ${customer.emailAddress}`