Skip to content

Commit

Permalink
💄 Add conditional rendering for image
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-rw committed Mar 7, 2023
1 parent 749f492 commit 13999e4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/widgets/rss/RssWidgetTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,17 @@ function RssTile({ widget }: RssTileProps) {
)}

<Flex gap="xs">
<MediaQuery query="(max-width: 1200px)" styles={{ display: 'none' }}>
<Image
src={item.enclosure?.url ?? undefined}
width={140}
height={140}
radius="md"
withPlaceholder
/>
</MediaQuery>
{item.enclosure && (
<MediaQuery query="(max-width: 1200px)" styles={{ display: 'none' }}>
<Image
src={item.enclosure?.url ?? undefined}
width={140}
height={140}
radius="md"
withPlaceholder
/>
</MediaQuery>
)}
<Flex gap={2} direction="column">
{item.categories && (
<Flex gap="xs" wrap="wrap" h={20} style={{ overflow: 'hidden' }}>
Expand Down

0 comments on commit 13999e4

Please sign in to comment.