Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
blocks
/
checkout
/
inner-blocks
/
checkout-order-summary-subtotal
:
block.tsx
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { Subtotal, TotalsWrapper } from '@woocommerce/blocks-checkout'; import { getCurrencyFromPriceResponse } from '@woocommerce/price-format'; import { useStoreCart } from '@woocommerce/base-context/hooks'; const Block = ( { className = '' }: { className?: string } ): JSX.Element => { const { cartTotals } = useStoreCart(); const totalsCurrency = getCurrencyFromPriceResponse( cartTotals ); return ( <TotalsWrapper className={ className }> <Subtotal currency={ totalsCurrency } values={ cartTotals } /> </TotalsWrapper> ); }; export default Block;