// @flow import React from 'react'; import Card from 'component/common/card'; import ErrorText from 'component/common/error-text'; import ZoomableImage from 'component/zoomableImage'; type Props = { source: string, }; function ImageViewer(props: Props) { const { source } = props; const [loadingError, setLoadingError] = React.useState(false); return ( {loadingError && ( There was an error displaying the image. You may still download it.} /> )} {!loadingError && (
setLoadingError(true)} />
)}
); } export default ImageViewer;