UNPKG

adblock-detect-react

Version:

Provides utilities to check if ad block is enabled on a page via both a React hook and a wrapper component.

7 lines 332 B
import React from "react"; import { useDetectAdBlock } from "../hooks/useDetectAdBlock"; export const AdBlockDetectedWrapper = ({ children, }) => { const adBlockDetected = useDetectAdBlock(); return React.createElement(React.Fragment, null, adBlockDetected && children); }; //# sourceMappingURL=AdBlockDetectedWrapper.js.map