import { mergeAttributes, PingbackAttributes } from '@giphy/js-analytics' import { createContext, FunctionComponent, h } from 'preact' import { useContext } from 'preact/hooks' type PingbackContextProps = { attributes: PingbackAttributes } export const PingbackContext = createContext({} as PingbackContextProps) const PingbackContextManager: FunctionComponent = ({ attributes, children }) => { const { attributes: parentAttributes = {} } = useContext(PingbackContext) return ( {children} ) } export default PingbackContextManager