UNPKG

@blocklet/payment-react

Version:

Reusable react components for payment kit v2

9 lines (8 loc) 353 B
import { PAYMENT_KIT_DID, isPaymentKitMounted } from "../libs/util.js"; export default function SafeGuard({ children }) { const mounted = isPaymentKitMounted(); if (mounted === false) { console.warn(`PaymentKit is required to use this feature: https://store.blocklet.dev/blocklets/${PAYMENT_KIT_DID}`); } return mounted ? children : null; }