Skip to content

Magento 2 : Get the Subtotal value in checkout page in PWA

We are using PWA Venia Reactjs setup. How to get the subtotal value in checkout page : src/components/CheckoutPage/checkoutPage.js

const checkoutMeta = () => {
fbq('track', 'InitiateCheckout', {
'value': total?.value,
'currency': total.currency
});
}

I tried above code and I can not able to get subtotal value in checkout page. here is full code : https://pastebin.com/wMNs8bEc