|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import classNames from 'classnames';
|
|
|
|
|
import { useDisableDrag } from '../../../../../hooks/useDisableDrag';
|
|
|
|
|
import { useEncryptedFileFetch } from '../../../../../hooks/useEncryptedFileFetch';
|
|
|
|
|
import styled from 'styled-components';
|
|
|
|
|
import { QuoteIcon, QuoteIconTypes } from './QuoteIconContainer';
|
|
|
|
|
|
|
|
|
|
const StyledQuoteImage = styled.div`
|
|
|
|
|
flex: initial;
|
|
|
|
@ -23,7 +23,7 @@ export const QuoteImage = (props: {
|
|
|
|
|
handleImageErrorBound: () => void;
|
|
|
|
|
url: string;
|
|
|
|
|
contentType: string;
|
|
|
|
|
icon?: string;
|
|
|
|
|
icon?: QuoteIconTypes;
|
|
|
|
|
}) => {
|
|
|
|
|
const { url, icon, contentType, handleImageErrorBound } = props;
|
|
|
|
|
const disableDrag = useDisableDrag();
|
|
|
|
@ -31,18 +31,7 @@ export const QuoteImage = (props: {
|
|
|
|
|
const { loading, urlToLoad } = useEncryptedFileFetch(url, contentType, false);
|
|
|
|
|
const srcData = !loading ? urlToLoad : '';
|
|
|
|
|
|
|
|
|
|
const iconElement = icon ? (
|
|
|
|
|
<div className="module-quote__icon-container__inner">
|
|
|
|
|
<div className="module-quote__icon-container__circle-background">
|
|
|
|
|
<div
|
|
|
|
|
className={classNames(
|
|
|
|
|
'module-quote__icon-container__icon',
|
|
|
|
|
`module-quote__icon-container__icon--${icon}`
|
|
|
|
|
)}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
) : null;
|
|
|
|
|
const iconElement = icon ? <QuoteIcon icon={icon} /> : null;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<StyledQuoteImage>
|
|
|
|
|