🔥 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 { export function normalizeCart(order: CartFragment): Cart {
console.log("raw rs: ", order)
return { return {
id: order.id.toString(), id: order.id.toString(),
createdAt: order.createdAt, createdAt: order.createdAt,

View File

@@ -74,7 +74,8 @@ const ProductCartItem = ({
{discounts.length > 0 && ( {discounts.length > 0 && (
<div className={s.old}> <div className={s.old}>
{/* <span className={s.number}>{oldPrice}</span> */} {/* <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>
)} )}
<div className={s.current}>{variant?.price} {currency?.code}</div> <div className={s.current}>{variant?.price} {currency?.code}</div>

View File

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