import style from '../styles/summary.module.css' import React from 'react' import formatCurrency from '~/libs/formatCurrency' import clsxm from '~/libs/clsxm' import { Skeleton } from '@chakra-ui/react' import _ from 'lodash' type Props = { total?: number discount?: number subtotal?: number tax?: number shipping?: number grandTotal?: number isLoaded: boolean } const CartSummary = ({ total, discount, subtotal, tax, shipping, grandTotal, isLoaded = false, }: Props) => { return ( <>
Ringkasan Pesanan
Total Belanja Rp {formatCurrency(subtotal || 0)} Total Diskon - Rp {formatCurrency(discount || 0)}
Subtotal Rp {formatCurrency(total || 0)} Tax 11% Rp {formatCurrency(tax || 0)} Biaya Kirim Rp {formatCurrency(shipping || 0)}
Grand Total Rp {formatCurrency(grandTotal || 0)}
) } export default CartSummary