mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
🔥 remove: log
:%s
This commit is contained in:
@@ -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,
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user