🔥 remove: log

:%s
This commit is contained in:
lytrankieio123
2021-10-20 09:28:42 +07:00
parent 3abada4777
commit c09789d4ac
4 changed files with 5 additions and 7 deletions

View File

@@ -36,7 +36,6 @@ export function normalizeFavoriteProductResult(item: Favorite) {
export function normalizeCart(order: CartFragment): Cart {
console.log("raw rs: ", order)
return {
id: order.id.toString(),
createdAt: order.createdAt,

View File

@@ -74,7 +74,8 @@ const ProductCartItem = ({
{discounts.length > 0 && (
<div className={s.old}>
{/* <span className={s.number}>{oldPrice}</span> */}
<LabelCommon type="discount">{discounts[0]}</LabelCommon>
{/* TODO: edit the value */}
<LabelCommon type="discount">{discounts[0]?.value}</LabelCommon>
</div>
)}
<div className={s.current}>{variant?.price} {currency?.code}</div>

View File

@@ -1,5 +1,5 @@
import { Cart } from '@commerce/types/cart'
import React, { useMemo } from 'react'
import React from 'react'
import { CardItemCheckout } from '../../../common'
import s from './CheckoutBill.module.scss'
import FormPromotionCode from './FormPromotionCode/FormPromotionCode'
@@ -10,8 +10,7 @@ interface CheckoutBillProps {
}
const CheckoutBill = ({ data }: CheckoutBillProps) => {
console.log("data here***: ", data)
// console.log("data here***: ", data)
return (
<div className={s.warpper}>
<div className={s.title}>
@@ -25,7 +24,6 @@ const CheckoutBill = ({ data }: CheckoutBillProps) => {
<div className={s.bot}>
<FormPromotionCode />
<div className={s.price}>
TODO: here
<div className={s.line}>
Discount {(data?.discounts?.length || 0) > 0 && `(${data?.discounts?.map(item => item.description).join(",")})`}
<div className={s.shipping}>{data?.totalDiscount} {data?.currency?.code}</div>

View File

@@ -33,7 +33,7 @@ const CheckoutPage = ({ }: CheckoutPageProps) => {
<h3>Your Cart({CHECKOUT_BILL_DATA.length})</h3>
<div onClick={onClose}><IconHide /></div>
</div>
<CheckoutBill data={CHECKOUT_BILL_DATA} />
<CheckoutBill data={order} />
</div>
</div>
</div>