Skip to content

Commit

Permalink
Regression: Image Attachment Description size (#28149)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocostadev committed Feb 28, 2023
1 parent 6e5ba71 commit c75bbf8
Showing 1 changed file with 10 additions and 14 deletions.
Expand Up @@ -6,8 +6,6 @@ import React from 'react';
import MarkdownText from '../../../../MarkdownText';
import MessageCollapsible from '../../../MessageCollapsible';
import MessageContentBody from '../../../MessageContentBody';
import Attachment from '../structure/Attachment';
import AttachmentContent from '../structure/AttachmentContent';
import AttachmentImage from '../structure/AttachmentImage';
import { useLoadImage } from './hooks/useLoadImage';

Expand All @@ -29,20 +27,18 @@ export const ImageAttachment: FC<ImageAttachmentProps> = ({
const getURL = useMediaUrl();

return (
<Attachment>
<>
{descriptionMd ? <MessageContentBody md={descriptionMd} /> : <MarkdownText parseEmoji content={description} />}
<MessageCollapsible title={title} hasDownload={hasDownload} link={getURL(link || url)} size={size}>
<AttachmentContent>
<AttachmentImage
{...imageDimensions}
loadImage={loadImage}
setLoadImage={setLoadImage}
dataSrc={getURL(link || url)}
src={getURL(url)}
previewUrl={`data:image/png;base64,${imagePreview}`}
/>
</AttachmentContent>
<AttachmentImage
{...imageDimensions}
loadImage={loadImage}
setLoadImage={setLoadImage}
dataSrc={getURL(link || url)}
src={getURL(url)}
previewUrl={`data:image/png;base64,${imagePreview}`}
/>
</MessageCollapsible>
</Attachment>
</>
);
};

0 comments on commit c75bbf8

Please sign in to comment.