import React from 'react';
import {
BlockStack,
render,
Text,
useExtensionApi,
} from '@shopify/checkout-ui-extensions-react';
// 1. Choose an extension point
render('Checkout::Dynamic::Render', () => (
));
function Extension() {
// 2. Use the extension API to gather context from the checkout and shop
const {cost, shop} = useExtensionApi();
// 3. Render a UI
return (
Shop name: {shop.name}
cost: {cost.totalAmount}
);
}