import { useMemo } from 'react'; import { useResponseBodyText } from '../../hooks/useResponseBodyText'; import type { HttpResponse } from '@yaakapp/api'; interface Props { response: HttpResponse; } export function WebPageViewer({ response }: Props) { const { url } = response; const body = useResponseBodyText(response).data ?? ''; const contentForIframe: string | undefined = useMemo(() => { if (body.includes('')) { return body.replace(//gi, ``); } return body; }, [url, body]); return (