UNPKG

@microbitsclub/paywall-solid

Version:
10 lines (9 loc) 309 B
import { useContext } from 'solid-js'; import { paywallPopoverContext } from './paywall-popover-context'; export const usePaywallPopover = () => { const ctx = useContext(paywallPopoverContext); if (ctx === undefined) { throw Error('PaywallPopoverProvider not found'); } return ctx; };