Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
blocks
/
cart
/
inner-blocks
/
cart-order-summary-block
:
frontend.tsx
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { TotalsFooterItem } from '@woocommerce/base-components/cart-checkout'; import { getCurrencyFromPriceResponse } from '@woocommerce/price-format'; import { useStoreCart } from '@woocommerce/base-context/hooks'; /** * Internal dependencies */ import { OrderMetaSlotFill } from './slotfills'; const FrontendBlock = ( { children, className = '', }: { children?: JSX.Element | JSX.Element[]; className?: string; } ): JSX.Element | null => { const { cartTotals } = useStoreCart(); const totalsCurrency = getCurrencyFromPriceResponse( cartTotals ); return ( <div className={ className }> { children } <div className="wc-block-components-totals-wrapper"> <TotalsFooterItem currency={ totalsCurrency } values={ cartTotals } /> </div> <OrderMetaSlotFill /> </div> ); }; export default FrontendBlock;