Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Refactor image rendering in MessageItem component
Browse files Browse the repository at this point in the history
  • Loading branch information
hirbod committed Nov 22, 2023
1 parent 33f9d00 commit 013b5bc
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,11 @@ export const MessageItem = memo(
{item.channel_message?.attachments?.length > 0 &&
item.channel_message?.attachments[0].mime.includes("image") ? (
Platform.OS === "web" ? (
<LeanView tw="flex-1">
<ImagePreview
key={`img-${channel_message.id}`}
attachment={channel_message}
isViewable={permissions?.can_view_creator_messages}
/>
</LeanView>
<ImagePreview
key={`img-${channel_message.id}`}
attachment={channel_message}
isViewable={permissions?.can_view_creator_messages}
/>
) : (
<SharedElement tag={channel_message?.id.toString()}>
{({ animatedRef, animatedStyles }) => (
Expand Down

0 comments on commit 013b5bc

Please sign in to comment.