// app/contact/CoreForm.tsx 'use client'; import Script from 'next/script'; import { useCallback, useEffect, useMemo, useRef } from 'react'; declare global { interface Window { CoreFormsClient?: { bind(host: HTMLElement | null): void }; } } export default function CoreForm({ html }: { html: string }) { const host = useRef(null); const markup = useMemo(() => ({ __html: html }), [html]); const bind = useCallback(() => window.CoreFormsClient?.bind(host.current), []); useEffect(() => { bind(); }, [bind, html]); return ( <>