import React from 'react'; import classNames from 'classnames'; import { useDisableDrag } from '../../../../../hooks/useDisableDrag'; import { useEncryptedFileFetch } from '../../../../../hooks/useEncryptedFileFetch'; export const QuoteImage = (props: { handleImageErrorBound: () => void; url: string; contentType: string; icon?: string; }) => { const { url, icon, contentType, handleImageErrorBound } = props; const disableDrag = useDisableDrag(); const { loading, urlToLoad } = useEncryptedFileFetch(url, contentType, false); const srcData = !loading ? urlToLoad : ''; const iconElement = icon ? (
) : null; return (
{window.i18n('quoteThumbnailAlt')} {iconElement}
); };