import React, { useEffect } from 'react'; import { FormattedMessage } from 'react-intl'; import SafeEmbed from 'soapbox/components/safe-embed'; import { Modal, Stack, Text, Input } from 'soapbox/components/ui'; import useEmbed from 'soapbox/queries/embed'; interface IEmbedModal { url: string, onError: (error: any) => void, } const EmbedModal: React.FC = ({ url, onError }) => { const { data: embed, error, isError } = useEmbed(url); useEffect(() => { if (error && isError) { onError(error); } }, [isError]); const handleInputClick: React.MouseEventHandler = (e) => { e.currentTarget.select(); }; return ( }> ); }; export default EmbedModal;