Skip to content

Commit

Permalink
use ternary instead of return
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed Jun 7, 2022
1 parent 4b4db23 commit 3439796
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,15 @@ const ImageRenderer = (props) => {
const imageHeight = htmlAttribs['data-expensify-height'] ? parseInt(htmlAttribs['data-expensify-height'], 10) : undefined;
const imagePreviewModalDisabled = htmlAttribs['data-expensify-preview-modal-disabled'] === 'true';

if (imagePreviewModalDisabled) {
return (
<ThumbnailImage
previewSourceURL={previewSource}
style={styles.webViewStyles.tagStyles.img}
isAuthTokenRequired={isAttachment}
imageWidth={imageWidth}
imageHeight={imageHeight}
/>
);
}

return (
return imagePreviewModalDisabled ? (
<ThumbnailImage
previewSourceURL={previewSource}
style={styles.webViewStyles.tagStyles.img}
isAuthTokenRequired={isAttachment}
imageWidth={imageWidth}
imageHeight={imageHeight}
/>
) : (
<AttachmentModal
allowDownload
sourceURL={source}
Expand Down

0 comments on commit 3439796

Please sign in to comment.